(t *testing.T)
| 481 | } |
| 482 | |
| 483 | func Test_Mock_On_WithVariadicFuncWithInterface(t *testing.T) { |
| 484 | t.Parallel() |
| 485 | |
| 486 | // make a test impl object |
| 487 | var mockedService = new(TestExampleImplementation) |
| 488 | |
| 489 | c := mockedService.On("TheExampleMethodVariadicInterface", []interface{}{1, 2, 3}). |
| 490 | Return(nil) |
| 491 | |
| 492 | assert.Equal(t, []*Call{c}, mockedService.ExpectedCalls) |
| 493 | assert.Equal(t, 1, len(c.Arguments)) |
| 494 | assert.Equal(t, []interface{}{1, 2, 3}, c.Arguments[0]) |
| 495 | |
| 496 | assert.NotPanics(t, func() { |
| 497 | mockedService.TheExampleMethodVariadicInterface(1, 2, 3) |
| 498 | }) |
| 499 | assert.Panics(t, func() { |
| 500 | mockedService.TheExampleMethodVariadicInterface(1, 2) |
| 501 | }) |
| 502 | |
| 503 | } |
| 504 | |
| 505 | func Test_Mock_On_WithVariadicFuncWithEmptyInterfaceArray(t *testing.T) { |
| 506 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…