After sets how long to block until the call returns Mock.On("MyMethod", arg1, arg2).After(time.Second)
(d time.Duration)
| 166 | // |
| 167 | // Mock.On("MyMethod", arg1, arg2).After(time.Second) |
| 168 | func (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 |