-
Notifications
You must be signed in to change notification settings - Fork 40
/
lifecycle_mock.go
173 lines (146 loc) · 5.19 KB
/
lifecycle_mock.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
// Code generated by MockGen. DO NOT EDIT.
// Source: ./lifecycle.go
// Package lifecycle is a generated GoMock package.
package lifecycle
import (
context "context"
os "os"
reflect "reflect"
gomock "go.uber.org/mock/gomock"
)
// MockService is a mock of Service interface.
type MockService struct {
ctrl *gomock.Controller
recorder *MockServiceMockRecorder
}
// MockServiceMockRecorder is the mock recorder for MockService.
type MockServiceMockRecorder struct {
mock *MockService
}
// NewMockService creates a new mock instance.
func NewMockService(ctrl *gomock.Controller) *MockService {
mock := &MockService{ctrl: ctrl}
mock.recorder = &MockServiceMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockService) EXPECT() *MockServiceMockRecorder {
return m.recorder
}
// Name mocks base method.
func (m *MockService) Name() string {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Name")
ret0, _ := ret[0].(string)
return ret0
}
// Name indicates an expected call of Name.
func (mr *MockServiceMockRecorder) Name() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Name", reflect.TypeOf((*MockService)(nil).Name))
}
// Start mocks base method.
func (m *MockService) Start(ctx context.Context) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Start", ctx)
ret0, _ := ret[0].(error)
return ret0
}
// Start indicates an expected call of Start.
func (mr *MockServiceMockRecorder) Start(ctx interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockService)(nil).Start), ctx)
}
// Stop mocks base method.
func (m *MockService) Stop(ctx context.Context) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Stop", ctx)
ret0, _ := ret[0].(error)
return ret0
}
// Stop indicates an expected call of Stop.
func (mr *MockServiceMockRecorder) Stop(ctx interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockService)(nil).Stop), ctx)
}
// MockLifecycle is a mock of Lifecycle interface.
type MockLifecycle struct {
ctrl *gomock.Controller
recorder *MockLifecycleMockRecorder
}
// MockLifecycleMockRecorder is the mock recorder for MockLifecycle.
type MockLifecycleMockRecorder struct {
mock *MockLifecycle
}
// NewMockLifecycle creates a new mock instance.
func NewMockLifecycle(ctrl *gomock.Controller) *MockLifecycle {
mock := &MockLifecycle{ctrl: ctrl}
mock.recorder = &MockLifecycleMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockLifecycle) EXPECT() *MockLifecycleMockRecorder {
return m.recorder
}
// RegisterServices mocks base method.
func (m *MockLifecycle) RegisterServices(modular ...Service) {
m.ctrl.T.Helper()
varargs := []interface{}{}
for _, a := range modular {
varargs = append(varargs, a)
}
m.ctrl.Call(m, "RegisterServices", varargs...)
}
// RegisterServices indicates an expected call of RegisterServices.
func (mr *MockLifecycleMockRecorder) RegisterServices(modular ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterServices", reflect.TypeOf((*MockLifecycle)(nil).RegisterServices), modular...)
}
// Signals mocks base method.
func (m *MockLifecycle) Signals(sigs ...os.Signal) Lifecycle {
m.ctrl.T.Helper()
varargs := []interface{}{}
for _, a := range sigs {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "Signals", varargs...)
ret0, _ := ret[0].(Lifecycle)
return ret0
}
// Signals indicates an expected call of Signals.
func (mr *MockLifecycleMockRecorder) Signals(sigs ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Signals", reflect.TypeOf((*MockLifecycle)(nil).Signals), sigs...)
}
// StartServices mocks base method.
func (m *MockLifecycle) StartServices(ctx context.Context) Lifecycle {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StartServices", ctx)
ret0, _ := ret[0].(Lifecycle)
return ret0
}
// StartServices indicates an expected call of StartServices.
func (mr *MockLifecycleMockRecorder) StartServices(ctx interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartServices", reflect.TypeOf((*MockLifecycle)(nil).StartServices), ctx)
}
// StopServices mocks base method.
func (m *MockLifecycle) StopServices(ctx context.Context) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "StopServices", ctx)
}
// StopServices indicates an expected call of StopServices.
func (mr *MockLifecycleMockRecorder) StopServices(ctx interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StopServices", reflect.TypeOf((*MockLifecycle)(nil).StopServices), ctx)
}
// Wait mocks base method.
func (m *MockLifecycle) Wait(ctx context.Context) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "Wait", ctx)
}
// Wait indicates an expected call of Wait.
func (mr *MockLifecycleMockRecorder) Wait(ctx interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Wait", reflect.TypeOf((*MockLifecycle)(nil).Wait), ctx)
}