Once indicates that the mock should only return the value once. Mock.On("MyMethod", arg1, arg2).Return(returnArg1, returnArg2).Once()
()
| 130 | // |
| 131 | // Mock.On("MyMethod", arg1, arg2).Return(returnArg1, returnArg2).Once() |
| 132 | func (c *Call) Once() *Call { |
| 133 | return c.Times(1) |
| 134 | } |
| 135 | |
| 136 | // Twice indicates that the mock should only return the value twice. |
| 137 | // |