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

Function Test_Mock_findExpectedCall_For_Unknown_Method

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

Source from the content-addressed store, hash-verified

1264}
1265
1266func Test_Mock_findExpectedCall_For_Unknown_Method(t *testing.T) {
1267 t.Parallel()
1268
1269 m := new(Mock)
1270 m.On("One", 1).Return("one")
1271 m.On("Two", 2).Return("two")
1272 m.On("Two", 3).Return("three")
1273
1274 f, _ := m.findExpectedCall("Two")
1275
1276 assert.Equal(t, -1, f)
1277
1278}
1279
1280func Test_Mock_findExpectedCall_Respects_Repeatability(t *testing.T) {
1281 t.Parallel()

Callers

nothing calls this directly

Calls 4

EqualFunction · 0.92
ReturnMethod · 0.80
findExpectedCallMethod · 0.80
OnMethod · 0.45

Tested by

no test coverage detected