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

Function Test_Mock_TestData

mock/mock_test.go:166–176  ·  view source on GitHub ↗

* Mock */

(t *testing.T)

Source from the content-addressed store, hash-verified

164*/
165
166func Test_Mock_TestData(t *testing.T) {
167 t.Parallel()
168
169 var mockedService = new(TestExampleImplementation)
170
171 if assert.NotNil(t, mockedService.TestData()) {
172
173 mockedService.TestData().Set("something", 123)
174 assert.Equal(t, 123, mockedService.TestData().Get("something").Data())
175 }
176}
177
178func Test_Mock_On(t *testing.T) {
179 t.Parallel()

Callers

nothing calls this directly

Calls 4

NotNilFunction · 0.92
EqualFunction · 0.92
TestDataMethod · 0.80
GetMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…