示例#1
0
文件: facade_test.go 项目: bac/juju
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"}},
			},
		})
	}
}
示例#2
0
文件: connect_test.go 项目: bac/juju
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])
}
示例#3
0
文件: worker_test.go 项目: bac/juju
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})
	}
}