(t *testing.T)
| 121 | } |
| 122 | |
| 123 | func TestPreferDriverInDI(t *testing.T) { |
| 124 | g := dig.New() |
| 125 | g.Provide(func() Driver { |
| 126 | return mockDriver{} |
| 127 | }) |
| 128 | driver, err := newDefaultDriver(DriverArgs{ |
| 129 | Populator: di.IntoPopulator(g), |
| 130 | }) |
| 131 | assert.NoError(t, err) |
| 132 | assert.IsType(t, mockDriver{}, driver) |
| 133 | } |
| 134 | |
| 135 | func TestPreferDriverInDI_error(t *testing.T) { |
| 136 | g := dig.New() |
nothing calls this directly
no test coverage detected