Return specifies the return arguments for the expectation. Mock.On("DoSomething").Return(errors.New("failed"))
(returnArguments ...interface{})
| 106 | // |
| 107 | // Mock.On("DoSomething").Return(errors.New("failed")) |
| 108 | func (c *Call) Return(returnArguments ...interface{}) *Call { |
| 109 | c.lock() |
| 110 | defer c.unlock() |
| 111 | |
| 112 | c.ReturnArguments = returnArguments |
| 113 | |
| 114 | return c |
| 115 | } |
| 116 | |
| 117 | // Panic specifies if the function call should fail and the panic message |
| 118 | // |