-
-
Notifications
You must be signed in to change notification settings - Fork 80
/
mocks_for_test.go
50 lines (44 loc) · 1.05 KB
/
mocks_for_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package testfixtures
import (
"database/sql"
)
type MockHelper struct {
dbName string
}
func (*MockHelper) init(*sql.DB) error {
return nil
}
func (*MockHelper) disableReferentialIntegrity(*sql.DB, loadFunction) error {
return nil
}
func (*MockHelper) paramType() int {
return 0
}
func (*MockHelper) tableNames(queryable) ([]string, error) {
return nil, nil
}
func (*MockHelper) isTableModified(queryable, string) (bool, error) {
return false, nil
}
func (*MockHelper) computeTablesChecksum(queryable) error {
return nil
}
func (*MockHelper) quoteKeyword(string) string {
return ""
}
func (*MockHelper) whileInsertOnTable(*sql.Tx, string, func() error) error {
return nil
}
func (h *MockHelper) databaseName(queryable) (string, error) {
return h.dbName, nil
}
func (h *MockHelper) cleanTableQuery(string) string {
return ""
}
func (h *MockHelper) buildInsertSQL(queryable, string, []string, []string) (string, error) {
return "", nil
}
// NewMockHelper returns MockHelper
func NewMockHelper(dbName string) *MockHelper {
return &MockHelper{dbName: dbName}
}