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

Function Test_Mock_On_WithFuncPanics

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

Source from the content-addressed store, hash-verified

527}
528
529func Test_Mock_On_WithFuncPanics(t *testing.T) {
530 t.Parallel()
531
532 // make a test impl object
533 var mockedService = new(TestExampleImplementation)
534
535 assert.Panics(t, func() {
536 mockedService.On("TheExampleMethodFunc", func(string) error { return nil })
537 })
538}
539
540func Test_Mock_On_WithFuncTypeArg(t *testing.T) {
541 t.Parallel()

Callers

nothing calls this directly

Calls 2

PanicsFunction · 0.92
OnMethod · 0.45

Tested by

no test coverage detected