MCPcopy
hub / github.com/stretchr/testify / On

Method On

mock/mock.go:207–209  ·  mock/mock.go::Call.On

On chains a new expectation description onto the mocked interface. This allows syntax like. Mock. On("MyMethod", 1).Return(nil). On("MyOtherMethod", 'a', 'b', 'c').Return(errors.New("Some Error")) go:noinline

(methodName string, arguments ...interface{})

Source from the content-addressed store, hash-verified

205//
206//go:noinline
207func (c *Call) On(methodName string, arguments ...interface{}) *Call {
208 return c.Parent.On(methodName, arguments...)
209}
210
211// Unset removes all mock handlers that satisfy the call instance arguments from being
212// called. Only supported on call instances with static input arguments.

Calls

no outgoing calls