-
Notifications
You must be signed in to change notification settings - Fork 211
/
mocks.go
79 lines (66 loc) · 2.2 KB
/
mocks.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
// Code generated by MockGen. DO NOT EDIT.
// Source: ./database.go
//
// Generated by this command:
//
// mockgen -typed -package=mocks -destination=./mocks/mocks.go -source=./database.go
//
// Package mocks is a generated GoMock package.
package mocks
import (
reflect "reflect"
sql "github.com/spacemeshos/go-spacemesh/sql"
gomock "go.uber.org/mock/gomock"
)
// MockExecutor is a mock of Executor interface.
type MockExecutor struct {
ctrl *gomock.Controller
recorder *MockExecutorMockRecorder
}
// MockExecutorMockRecorder is the mock recorder for MockExecutor.
type MockExecutorMockRecorder struct {
mock *MockExecutor
}
// NewMockExecutor creates a new mock instance.
func NewMockExecutor(ctrl *gomock.Controller) *MockExecutor {
mock := &MockExecutor{ctrl: ctrl}
mock.recorder = &MockExecutorMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockExecutor) EXPECT() *MockExecutorMockRecorder {
return m.recorder
}
// Exec mocks base method.
func (m *MockExecutor) Exec(arg0 string, arg1 sql.Encoder, arg2 sql.Decoder) (int, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Exec", arg0, arg1, arg2)
ret0, _ := ret[0].(int)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Exec indicates an expected call of Exec.
func (mr *MockExecutorMockRecorder) Exec(arg0, arg1, arg2 any) *MockExecutorExecCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Exec", reflect.TypeOf((*MockExecutor)(nil).Exec), arg0, arg1, arg2)
return &MockExecutorExecCall{Call: call}
}
// MockExecutorExecCall wrap *gomock.Call
type MockExecutorExecCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockExecutorExecCall) Return(arg0 int, arg1 error) *MockExecutorExecCall {
c.Call = c.Call.Return(arg0, arg1)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockExecutorExecCall) Do(f func(string, sql.Encoder, sql.Decoder) (int, error)) *MockExecutorExecCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockExecutorExecCall) DoAndReturn(f func(string, sql.Encoder, sql.Decoder) (int, error)) *MockExecutorExecCall {
c.Call = c.Call.DoAndReturn(f)
return c
}