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

Function Test_Mock_On

mock/mock_test.go:178–187  ·  mock/mock_test.go::Test_Mock_On
(t *testing.T)

Source from the content-addressed store, hash-verified

176}
177
178func Test_Mock_On(t *testing.T) {
179 t.Parallel()
180
181 // make a test impl object
182 var mockedService = new(TestExampleImplementation)
183
184 c := mockedService.On("TheExampleMethod")
185 assert.Equal(t, []*Call{c}, mockedService.ExpectedCalls)
186 assert.Equal(t, "TheExampleMethod", c.Method)
187}
188
189func Test_Mock_Chained_On(t *testing.T) {
190 t.Parallel()

Callers

nothing calls this directly

Calls 2

EqualFunction · 0.92
OnMethod · 0.45

Tested by

no test coverage detected