* Setting expectations */ Test sets the [TestingT] on which errors will be reported, otherwise errors will cause a panic. Test should not be called on an object that is going to be used in a goroutine other than the one running the test function.
(t TestingT)
| 343 | // Test should not be called on an object that is going to be used in a |
| 344 | // goroutine other than the one running the test function. |
| 345 | func (m *Mock) Test(t TestingT) { |
| 346 | m.mutex.Lock() |
| 347 | defer m.mutex.Unlock() |
| 348 | m.test = t |
| 349 | } |
| 350 | |
| 351 | // fail fails the current test with the given formatted format and args. |
| 352 | // In case that a test was defined, it uses the test APIs for failing a test, |
no outgoing calls