(t testing.TB)
| 82 | } |
| 83 | |
| 84 | func WithMockSQL(t testing.TB) (*MockSQL, func()) { |
| 85 | t.Helper() |
| 86 | |
| 87 | ctrl := gomock.NewController(t) |
| 88 | |
| 89 | mocks := &MockSQL{ |
| 90 | Conn: NewMockConn(ctrl), |
| 91 | Stmt: NewMockStmt(ctrl), |
| 92 | Result: NewMockResult(ctrl), |
| 93 | Rows: NewMockRows(ctrl), |
| 94 | } |
| 95 | |
| 96 | return mocks, func() { |
| 97 | ctrl.Finish() |
| 98 | } |
| 99 | } |
| 100 | |
| 101 | func TestExampleSQL(t *testing.T) { |
| 102 | tests := map[string]struct { |
no test coverage detected
searching dependent graphs…