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

Function Test_Mock_AssertExpectations

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

Source from the content-addressed store, hash-verified

1491}
1492
1493func Test_Mock_AssertExpectations(t *testing.T) {
1494 t.Parallel()
1495
1496 var mockedService = new(TestExampleImplementation)
1497
1498 mockedService.On("Test_Mock_AssertExpectations", 1, 2, 3).Return(5, 6, 7)
1499
1500 tt := new(testing.T)
1501 assert.False(t, mockedService.AssertExpectations(tt))
1502
1503 // make the call now
1504 mockedService.Called(1, 2, 3)
1505
1506 // now assert expectations
1507 assert.True(t, mockedService.AssertExpectations(tt))
1508
1509}
1510
1511func Test_Mock_AssertExpectations_Placeholder_NoArgs(t *testing.T) {
1512 t.Parallel()

Callers

nothing calls this directly

Calls 6

FalseFunction · 0.92
TrueFunction · 0.92
ReturnMethod · 0.80
CalledMethod · 0.80
AssertExpectationsMethod · 0.65
OnMethod · 0.45

Tested by

no test coverage detected