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

Struct Mock

mock/mock.go:300–317  ·  view source on GitHub ↗

Mock is the workhorse used to track activity on another object. For an example of its usage, refer to the "Example Usage" section at the top of this document.

Source from the content-addressed store, hash-verified

298// For an example of its usage, refer to the "Example Usage" section at the top
299// of this document.
300type Mock struct {
301 // Represents the calls that are expected of
302 // an object.
303 ExpectedCalls []*Call
304
305 // Holds the calls that were made to this mocked object.
306 Calls []Call
307
308 // test is An optional variable that holds the test struct, to be used when an
309 // invalid mock call was made.
310 test TestingT
311
312 // TestData holds any data that might be useful for testing. Testify ignores
313 // this data completely allowing you to do whatever you like with it.
314 testData objx.Map
315
316 mutex sync.Mutex
317}
318
319// String provides a %v format string for Mock.
320// Note: this is used implicitly by Arguments.Diff if a Mock is passed.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected