-
Notifications
You must be signed in to change notification settings - Fork 1
/
mock_client_test.go
184 lines (159 loc) · 5.8 KB
/
mock_client_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
179
180
181
182
183
184
// Code generated by MockGen. DO NOT EDIT.
// Source: /Users/ringsaturn/go/pkg/mod/github.com/philchia/agollo/[email protected]/client.go
// Package oap_test is a generated GoMock package.
package oap_test
import (
reflect "reflect"
agollo "github.com/philchia/agollo/v4"
gomock "go.uber.org/mock/gomock"
)
// MockClient is a mock of Client interface.
type MockClient struct {
ctrl *gomock.Controller
recorder *MockClientMockRecorder
}
// MockClientMockRecorder is the mock recorder for MockClient.
type MockClientMockRecorder struct {
mock *MockClient
}
// NewMockClient creates a new mock instance.
func NewMockClient(ctrl *gomock.Controller) *MockClient {
mock := &MockClient{ctrl: ctrl}
mock.recorder = &MockClientMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockClient) EXPECT() *MockClientMockRecorder {
return m.recorder
}
// GetAllKeys mocks base method.
func (m *MockClient) GetAllKeys(opts ...agollo.OpOption) []string {
m.ctrl.T.Helper()
varargs := []interface{}{}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "GetAllKeys", varargs...)
ret0, _ := ret[0].([]string)
return ret0
}
// GetAllKeys indicates an expected call of GetAllKeys.
func (mr *MockClientMockRecorder) GetAllKeys(opts ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllKeys", reflect.TypeOf((*MockClient)(nil).GetAllKeys), opts...)
}
// GetContent mocks base method.
func (m *MockClient) GetContent(opts ...agollo.OpOption) string {
m.ctrl.T.Helper()
varargs := []interface{}{}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "GetContent", varargs...)
ret0, _ := ret[0].(string)
return ret0
}
// GetContent indicates an expected call of GetContent.
func (mr *MockClientMockRecorder) GetContent(opts ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContent", reflect.TypeOf((*MockClient)(nil).GetContent), opts...)
}
// GetPropertiesContent mocks base method.
func (m *MockClient) GetPropertiesContent(opts ...agollo.OpOption) string {
m.ctrl.T.Helper()
varargs := []interface{}{}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "GetPropertiesContent", varargs...)
ret0, _ := ret[0].(string)
return ret0
}
// GetPropertiesContent indicates an expected call of GetPropertiesContent.
func (mr *MockClientMockRecorder) GetPropertiesContent(opts ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPropertiesContent", reflect.TypeOf((*MockClient)(nil).GetPropertiesContent), opts...)
}
// GetReleaseKey mocks base method.
func (m *MockClient) GetReleaseKey(opts ...agollo.OpOption) string {
m.ctrl.T.Helper()
varargs := []interface{}{}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "GetReleaseKey", varargs...)
ret0, _ := ret[0].(string)
return ret0
}
// GetReleaseKey indicates an expected call of GetReleaseKey.
func (mr *MockClientMockRecorder) GetReleaseKey(opts ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetReleaseKey", reflect.TypeOf((*MockClient)(nil).GetReleaseKey), opts...)
}
// GetString mocks base method.
func (m *MockClient) GetString(key string, opts ...agollo.OpOption) string {
m.ctrl.T.Helper()
varargs := []interface{}{key}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "GetString", varargs...)
ret0, _ := ret[0].(string)
return ret0
}
// GetString indicates an expected call of GetString.
func (mr *MockClientMockRecorder) GetString(key interface{}, opts ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{key}, opts...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetString", reflect.TypeOf((*MockClient)(nil).GetString), varargs...)
}
// OnUpdate mocks base method.
func (m *MockClient) OnUpdate(arg0 func(*agollo.ChangeEvent)) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "OnUpdate", arg0)
}
// OnUpdate indicates an expected call of OnUpdate.
func (mr *MockClientMockRecorder) OnUpdate(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OnUpdate", reflect.TypeOf((*MockClient)(nil).OnUpdate), arg0)
}
// Start mocks base method.
func (m *MockClient) Start() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Start")
ret0, _ := ret[0].(error)
return ret0
}
// Start indicates an expected call of Start.
func (mr *MockClientMockRecorder) Start() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockClient)(nil).Start))
}
// Stop mocks base method.
func (m *MockClient) Stop() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Stop")
ret0, _ := ret[0].(error)
return ret0
}
// Stop indicates an expected call of Stop.
func (mr *MockClientMockRecorder) Stop() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockClient)(nil).Stop))
}
// SubscribeToNamespaces mocks base method.
func (m *MockClient) SubscribeToNamespaces(namespaces ...string) error {
m.ctrl.T.Helper()
varargs := []interface{}{}
for _, a := range namespaces {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "SubscribeToNamespaces", varargs...)
ret0, _ := ret[0].(error)
return ret0
}
// SubscribeToNamespaces indicates an expected call of SubscribeToNamespaces.
func (mr *MockClientMockRecorder) SubscribeToNamespaces(namespaces ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubscribeToNamespaces", reflect.TypeOf((*MockClient)(nil).SubscribeToNamespaces), namespaces...)
}