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

Method After

mock/mock.go:168–173  ·  view source on GitHub ↗

After sets how long to block until the call returns Mock.On("MyMethod", arg1, arg2).After(time.Second)

(d time.Duration)

Source from the content-addressed store, hash-verified

166//
167// Mock.On("MyMethod", arg1, arg2).After(time.Second)
168func (c *Call) After(d time.Duration) *Call {
169 c.lock()
170 defer c.unlock()
171 c.waitTime = d
172 return c
173}
174
175// Run sets a handler to be called before returning. It can be used when
176// mocking a method (such as an unmarshaler) that takes a pointer to a struct and

Callers 6

Test_Mock_Return_AfterFunction · 0.80
Test_Mock_Called_blocksFunction · 0.80
WithinRangeFunction · 0.80

Calls 2

lockMethod · 0.95
unlockMethod · 0.95