forked from tab/smartid
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathworker_mock.go
More file actions
107 lines (90 loc) · 3.14 KB
/
worker_mock.go
File metadata and controls
107 lines (90 loc) · 3.14 KB
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
// Code generated by MockGen. DO NOT EDIT.
// Source: worker.go
//
// Generated by this command:
//
// mockgen -source=worker.go -destination=worker_mock.go -package=smartid
//
// Package smartid is a generated GoMock package.
package smartid
import (
context "context"
reflect "reflect"
gomock "go.uber.org/mock/gomock"
)
// MockWorker is a mock of Worker interface.
type MockWorker struct {
ctrl *gomock.Controller
recorder *MockWorkerMockRecorder
isgomock struct{}
}
// MockWorkerMockRecorder is the mock recorder for MockWorker.
type MockWorkerMockRecorder struct {
mock *MockWorker
}
// NewMockWorker creates a new mock instance.
func NewMockWorker(ctrl *gomock.Controller) *MockWorker {
mock := &MockWorker{ctrl: ctrl}
mock.recorder = &MockWorkerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockWorker) EXPECT() *MockWorkerMockRecorder {
return m.recorder
}
// Process mocks base method.
func (m *MockWorker) Process(ctx context.Context, sessionId string) <-chan Result {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Process", ctx, sessionId)
ret0, _ := ret[0].(<-chan Result)
return ret0
}
// Process indicates an expected call of Process.
func (mr *MockWorkerMockRecorder) Process(ctx, sessionId any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Process", reflect.TypeOf((*MockWorker)(nil).Process), ctx, sessionId)
}
// Start mocks base method.
func (m *MockWorker) Start(ctx context.Context) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "Start", ctx)
}
// Start indicates an expected call of Start.
func (mr *MockWorkerMockRecorder) Start(ctx any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockWorker)(nil).Start), ctx)
}
// Stop mocks base method.
func (m *MockWorker) Stop() {
m.ctrl.T.Helper()
m.ctrl.Call(m, "Stop")
}
// Stop indicates an expected call of Stop.
func (mr *MockWorkerMockRecorder) Stop() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockWorker)(nil).Stop))
}
// WithConcurrency mocks base method.
func (m *MockWorker) WithConcurrency(concurrency int) Worker {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "WithConcurrency", concurrency)
ret0, _ := ret[0].(Worker)
return ret0
}
// WithConcurrency indicates an expected call of WithConcurrency.
func (mr *MockWorkerMockRecorder) WithConcurrency(concurrency any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WithConcurrency", reflect.TypeOf((*MockWorker)(nil).WithConcurrency), concurrency)
}
// WithQueueSize mocks base method.
func (m *MockWorker) WithQueueSize(size int) Worker {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "WithQueueSize", size)
ret0, _ := ret[0].(Worker)
return ret0
}
// WithQueueSize indicates an expected call of WithQueueSize.
func (mr *MockWorkerMockRecorder) WithQueueSize(size any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WithQueueSize", reflect.TypeOf((*MockWorker)(nil).WithQueueSize), size)
}