forked from harness/gitness
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mock_registry.go
153 lines (125 loc) · 3.96 KB
/
mock_registry.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
// Automatically generated by MockGen. DO NOT EDIT!
// Source: registry.go
package event
import (
gomock "code.google.com/p/gomock/gomock"
)
// Mock of Handler interface
type MockHandler struct {
ctrl *gomock.Controller
recorder *_MockHandlerRecorder
}
// Recorder for MockHandler (not exported)
type _MockHandlerRecorder struct {
mock *MockHandler
}
func NewMockHandler(ctrl *gomock.Controller) *MockHandler {
mock := &MockHandler{ctrl: ctrl}
mock.recorder = &_MockHandlerRecorder{mock}
return mock
}
func (_m *MockHandler) EXPECT() *_MockHandlerRecorder {
return _m.recorder
}
func (_m *MockHandler) Run(_param0 ...interface{}) {
_s := []interface{}{}
for _, _x := range _param0 {
_s = append(_s, _x)
}
_m.ctrl.Call(_m, "Run", _s...)
}
func (_mr *_MockHandlerRecorder) Run(arg0 ...interface{}) *gomock.Call {
return _mr.mock.ctrl.RecordCall(_mr.mock, "Run", arg0...)
}
func (_m *MockHandler) Id() HandlerID {
ret := _m.ctrl.Call(_m, "Id")
ret0, _ := ret[0].(HandlerID)
return ret0
}
func (_mr *_MockHandlerRecorder) Id() *gomock.Call {
return _mr.mock.ctrl.RecordCall(_mr.mock, "Id")
}
// Mock of EventDispatcher interface
type MockEventDispatcher struct {
ctrl *gomock.Controller
recorder *_MockEventDispatcherRecorder
}
// Recorder for MockEventDispatcher (not exported)
type _MockEventDispatcherRecorder struct {
mock *MockEventDispatcher
}
func NewMockEventDispatcher(ctrl *gomock.Controller) *MockEventDispatcher {
mock := &MockEventDispatcher{ctrl: ctrl}
mock.recorder = &_MockEventDispatcherRecorder{mock}
return mock
}
func (_m *MockEventDispatcher) EXPECT() *_MockEventDispatcherRecorder {
return _m.recorder
}
func (_m *MockEventDispatcher) Dispatch(name string, ev ...interface{}) {
_s := []interface{}{name}
for _, _x := range ev {
_s = append(_s, _x)
}
_m.ctrl.Call(_m, "Dispatch", _s...)
}
func (_mr *_MockEventDispatcherRecorder) Dispatch(arg0 interface{}, arg1 ...interface{}) *gomock.Call {
_s := append([]interface{}{arg0}, arg1...)
return _mr.mock.ctrl.RecordCall(_mr.mock, "Dispatch", _s...)
}
// Mock of EventRegistry interface
type MockEventRegistry struct {
ctrl *gomock.Controller
recorder *_MockEventRegistryRecorder
}
// Recorder for MockEventRegistry (not exported)
type _MockEventRegistryRecorder struct {
mock *MockEventRegistry
}
func NewMockEventRegistry(ctrl *gomock.Controller) *MockEventRegistry {
mock := &MockEventRegistry{ctrl: ctrl}
mock.recorder = &_MockEventRegistryRecorder{mock}
return mock
}
func (_m *MockEventRegistry) EXPECT() *_MockEventRegistryRecorder {
return _m.recorder
}
func (_m *MockEventRegistry) AddHandler(h Handler, names ...string) {
_s := []interface{}{h}
for _, _x := range names {
_s = append(_s, _x)
}
_m.ctrl.Call(_m, "AddHandler", _s...)
}
func (_mr *_MockEventRegistryRecorder) AddHandler(arg0 interface{}, arg1 ...interface{}) *gomock.Call {
_s := append([]interface{}{arg0}, arg1...)
return _mr.mock.ctrl.RecordCall(_mr.mock, "AddHandler", _s...)
}
func (_m *MockEventRegistry) DelHandler(h Handler, names ...string) {
_s := []interface{}{h}
for _, _x := range names {
_s = append(_s, _x)
}
_m.ctrl.Call(_m, "DelHandler", _s...)
}
func (_mr *_MockEventRegistryRecorder) DelHandler(arg0 interface{}, arg1 ...interface{}) *gomock.Call {
_s := append([]interface{}{arg0}, arg1...)
return _mr.mock.ctrl.RecordCall(_mr.mock, "DelHandler", _s...)
}
func (_m *MockEventRegistry) Dispatch(name string, ev ...interface{}) {
_s := []interface{}{name}
for _, _x := range ev {
_s = append(_s, _x)
}
_m.ctrl.Call(_m, "Dispatch", _s...)
}
func (_mr *_MockEventRegistryRecorder) Dispatch(arg0 interface{}, arg1 ...interface{}) *gomock.Call {
_s := append([]interface{}{arg0}, arg1...)
return _mr.mock.ctrl.RecordCall(_mr.mock, "Dispatch", _s...)
}
func (_m *MockEventRegistry) ClearEvents(name string) {
_m.ctrl.Call(_m, "ClearEvents", name)
}
func (_mr *_MockEventRegistryRecorder) ClearEvents(arg0 interface{}) *gomock.Call {
return _mr.mock.ctrl.RecordCall(_mr.mock, "ClearEvents", arg0)
}