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

Function Test_Mock_On_WithArgs

mock/mock_test.go:222–233  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

220}
221
222func Test_Mock_On_WithArgs(t *testing.T) {
223 t.Parallel()
224
225 // make a test impl object
226 var mockedService = new(TestExampleImplementation)
227
228 c := mockedService.On("TheExampleMethod", 1, 2, 3, 4)
229
230 assert.Equal(t, []*Call{c}, mockedService.ExpectedCalls)
231 assert.Equal(t, "TheExampleMethod", c.Method)
232 assert.Equal(t, Arguments{1, 2, 3, 4}, c.Arguments)
233}
234
235func Test_Mock_On_WithFuncArg(t *testing.T) {
236 t.Parallel()

Callers

nothing calls this directly

Calls 2

EqualFunction · 0.92
OnMethod · 0.45

Tested by

no test coverage detected