(t *testing.T)
| 197 | } |
| 198 | |
| 199 | func Test_userExampleDao_CreateByTx(t *testing.T) { |
| 200 | d := newUserExampleDao() |
| 201 | defer d.Close() |
| 202 | testData := d.TestData.(*model.UserExample) |
| 203 | |
| 204 | d.SQLMock.ExpectBegin() |
| 205 | d.SQLMock.ExpectExec("INSERT INTO .*"). |
| 206 | WithArgs(d.GetAnyArgs(testData)...). |
| 207 | WillReturnResult(sqlmock.NewResult(1, 1)) |
| 208 | d.SQLMock.ExpectCommit() |
| 209 | |
| 210 | _, err := d.IDao.(UserExampleDao).CreateByTx(d.Ctx, d.DB, testData) |
| 211 | if err != nil { |
| 212 | t.Fatal(err) |
| 213 | } |
| 214 | } |
| 215 | |
| 216 | func Test_userExampleDao_DeleteByTx(t *testing.T) { |
| 217 | d := newUserExampleDao() |
nothing calls this directly
no test coverage detected