func assertReadyToTest(c *gc.C, receiver state.ActionReceiver) { // make sure there are no actions on the receiver already. actions, err := receiver.Actions() c.Assert(err, jc.ErrorIsNil) c.Assert(actions, gc.HasLen, 0) // make sure there are no actions pending already. actions, err = receiver.PendingActions() c.Assert(err, jc.ErrorIsNil) c.Assert(actions, gc.HasLen, 0) // make sure there are no actions running already. actions, err = receiver.RunningActions() c.Assert(err, jc.ErrorIsNil) c.Assert(actions, gc.HasLen, 0) // make sure there are no actions completed already. actions, err = receiver.CompletedActions() c.Assert(err, jc.ErrorIsNil) c.Assert(actions, gc.HasLen, 0) }