-
Notifications
You must be signed in to change notification settings - Fork 3
/
mock_source_test.go
178 lines (152 loc) · 6.12 KB
/
mock_source_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
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/conduitio/conduit-connector-sdk (interfaces: Source)
//
// Generated by this command:
//
// mockgen -destination=mock_source_test.go -self_package=github.com/conduitio/conduit-connector-sdk -package=sdk -write_package_comment=false . Source
package sdk
import (
context "context"
reflect "reflect"
config "github.com/conduitio/conduit-commons/config"
opencdc "github.com/conduitio/conduit-commons/opencdc"
gomock "go.uber.org/mock/gomock"
)
// MockSource is a mock of Source interface.
type MockSource struct {
ctrl *gomock.Controller
recorder *MockSourceMockRecorder
}
// MockSourceMockRecorder is the mock recorder for MockSource.
type MockSourceMockRecorder struct {
mock *MockSource
}
// NewMockSource creates a new mock instance.
func NewMockSource(ctrl *gomock.Controller) *MockSource {
mock := &MockSource{ctrl: ctrl}
mock.recorder = &MockSourceMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockSource) EXPECT() *MockSourceMockRecorder {
return m.recorder
}
// Ack mocks base method.
func (m *MockSource) Ack(arg0 context.Context, arg1 opencdc.Position) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Ack", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// Ack indicates an expected call of Ack.
func (mr *MockSourceMockRecorder) Ack(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Ack", reflect.TypeOf((*MockSource)(nil).Ack), arg0, arg1)
}
// Configure mocks base method.
func (m *MockSource) Configure(arg0 context.Context, arg1 map[string]string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Configure", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// Configure indicates an expected call of Configure.
func (mr *MockSourceMockRecorder) Configure(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Configure", reflect.TypeOf((*MockSource)(nil).Configure), arg0, arg1)
}
// LifecycleOnCreated mocks base method.
func (m *MockSource) LifecycleOnCreated(arg0 context.Context, arg1 map[string]string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "LifecycleOnCreated", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// LifecycleOnCreated indicates an expected call of LifecycleOnCreated.
func (mr *MockSourceMockRecorder) LifecycleOnCreated(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LifecycleOnCreated", reflect.TypeOf((*MockSource)(nil).LifecycleOnCreated), arg0, arg1)
}
// LifecycleOnDeleted mocks base method.
func (m *MockSource) LifecycleOnDeleted(arg0 context.Context, arg1 map[string]string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "LifecycleOnDeleted", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// LifecycleOnDeleted indicates an expected call of LifecycleOnDeleted.
func (mr *MockSourceMockRecorder) LifecycleOnDeleted(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LifecycleOnDeleted", reflect.TypeOf((*MockSource)(nil).LifecycleOnDeleted), arg0, arg1)
}
// LifecycleOnUpdated mocks base method.
func (m *MockSource) LifecycleOnUpdated(arg0 context.Context, arg1, arg2 map[string]string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "LifecycleOnUpdated", arg0, arg1, arg2)
ret0, _ := ret[0].(error)
return ret0
}
// LifecycleOnUpdated indicates an expected call of LifecycleOnUpdated.
func (mr *MockSourceMockRecorder) LifecycleOnUpdated(arg0, arg1, arg2 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LifecycleOnUpdated", reflect.TypeOf((*MockSource)(nil).LifecycleOnUpdated), arg0, arg1, arg2)
}
// Open mocks base method.
func (m *MockSource) Open(arg0 context.Context, arg1 opencdc.Position) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Open", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// Open indicates an expected call of Open.
func (mr *MockSourceMockRecorder) Open(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Open", reflect.TypeOf((*MockSource)(nil).Open), arg0, arg1)
}
// Parameters mocks base method.
func (m *MockSource) Parameters() config.Parameters {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Parameters")
ret0, _ := ret[0].(config.Parameters)
return ret0
}
// Parameters indicates an expected call of Parameters.
func (mr *MockSourceMockRecorder) Parameters() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Parameters", reflect.TypeOf((*MockSource)(nil).Parameters))
}
// Read mocks base method.
func (m *MockSource) Read(arg0 context.Context) (opencdc.Record, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Read", arg0)
ret0, _ := ret[0].(opencdc.Record)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Read indicates an expected call of Read.
func (mr *MockSourceMockRecorder) Read(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Read", reflect.TypeOf((*MockSource)(nil).Read), arg0)
}
// Teardown mocks base method.
func (m *MockSource) Teardown(arg0 context.Context) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Teardown", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// Teardown indicates an expected call of Teardown.
func (mr *MockSourceMockRecorder) Teardown(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Teardown", reflect.TypeOf((*MockSource)(nil).Teardown), arg0)
}
// mustEmbedUnimplementedSource mocks base method.
func (m *MockSource) mustEmbedUnimplementedSource() {
m.ctrl.T.Helper()
m.ctrl.Call(m, "mustEmbedUnimplementedSource")
}
// mustEmbedUnimplementedSource indicates an expected call of mustEmbedUnimplementedSource.
func (mr *MockSourceMockRecorder) mustEmbedUnimplementedSource() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "mustEmbedUnimplementedSource", reflect.TypeOf((*MockSource)(nil).mustEmbedUnimplementedSource))
}