func checkCalls(c *gc.C, stub *testing.Stub, names ...string) { stub.CheckCallNames(c, names...) for _, call := range stub.Calls() { c.Check(call.Args, jc.DeepEquals, []interface{}{ params.Entities{ []params.Entity{{"model-some-uuid"}}, }, }) } }
func (*ScaryConnectSuite) assertChangePasswordSuccess(c *gc.C, stub *testing.Stub) { err := checkChangePassword(c, stub) c.Check(err, gc.Equals, apicaller.ErrChangedPassword) stub.CheckCallNames(c, "Life", "ChangeConfig", // Be careful, these are two different SetPassword receivers. "SetPassword", "SetOldPassword", "SetPassword", "Close", ) checkSaneChange(c, stub.Calls()[2:5]) }
func checkCalls(c *gc.C, stub *testing.Stub, names ...string) { stub.CheckCallNames(c, names...) for _, call := range stub.Calls() { c.Check(call.Args, gc.DeepEquals, []interface{}{testEntity}) } }