github.com/metacubex/quic-go@v0.44.1-0.20240520163451-20b689a59136/mock_conn_runner_test.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: github.com/metacubex/quic-go (interfaces: ConnRunner) 3 // 4 // Generated by this command: 5 // 6 // mockgen -typed -build_flags=-tags=gomock -package quic -self_package github.com/metacubex/quic-go -destination mock_conn_runner_test.go github.com/metacubex/quic-go ConnRunner 7 // 8 9 // Package quic is a generated GoMock package. 10 package quic 11 12 import ( 13 reflect "reflect" 14 15 protocol "github.com/metacubex/quic-go/internal/protocol" 16 gomock "go.uber.org/mock/gomock" 17 ) 18 19 // MockConnRunner is a mock of ConnRunner interface. 20 type MockConnRunner struct { 21 ctrl *gomock.Controller 22 recorder *MockConnRunnerMockRecorder 23 } 24 25 // MockConnRunnerMockRecorder is the mock recorder for MockConnRunner. 26 type MockConnRunnerMockRecorder struct { 27 mock *MockConnRunner 28 } 29 30 // NewMockConnRunner creates a new mock instance. 31 func NewMockConnRunner(ctrl *gomock.Controller) *MockConnRunner { 32 mock := &MockConnRunner{ctrl: ctrl} 33 mock.recorder = &MockConnRunnerMockRecorder{mock} 34 return mock 35 } 36 37 // EXPECT returns an object that allows the caller to indicate expected use. 38 func (m *MockConnRunner) EXPECT() *MockConnRunnerMockRecorder { 39 return m.recorder 40 } 41 42 // Add mocks base method. 43 func (m *MockConnRunner) Add(arg0 protocol.ConnectionID, arg1 packetHandler) bool { 44 m.ctrl.T.Helper() 45 ret := m.ctrl.Call(m, "Add", arg0, arg1) 46 ret0, _ := ret[0].(bool) 47 return ret0 48 } 49 50 // Add indicates an expected call of Add. 51 func (mr *MockConnRunnerMockRecorder) Add(arg0, arg1 any) *MockConnRunnerAddCall { 52 mr.mock.ctrl.T.Helper() 53 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Add", reflect.TypeOf((*MockConnRunner)(nil).Add), arg0, arg1) 54 return &MockConnRunnerAddCall{Call: call} 55 } 56 57 // MockConnRunnerAddCall wrap *gomock.Call 58 type MockConnRunnerAddCall struct { 59 *gomock.Call 60 } 61 62 // Return rewrite *gomock.Call.Return 63 func (c *MockConnRunnerAddCall) Return(arg0 bool) *MockConnRunnerAddCall { 64 c.Call = c.Call.Return(arg0) 65 return c 66 } 67 68 // Do rewrite *gomock.Call.Do 69 func (c *MockConnRunnerAddCall) Do(f func(protocol.ConnectionID, packetHandler) bool) *MockConnRunnerAddCall { 70 c.Call = c.Call.Do(f) 71 return c 72 } 73 74 // DoAndReturn rewrite *gomock.Call.DoAndReturn 75 func (c *MockConnRunnerAddCall) DoAndReturn(f func(protocol.ConnectionID, packetHandler) bool) *MockConnRunnerAddCall { 76 c.Call = c.Call.DoAndReturn(f) 77 return c 78 } 79 80 // AddResetToken mocks base method. 81 func (m *MockConnRunner) AddResetToken(arg0 protocol.StatelessResetToken, arg1 packetHandler) { 82 m.ctrl.T.Helper() 83 m.ctrl.Call(m, "AddResetToken", arg0, arg1) 84 } 85 86 // AddResetToken indicates an expected call of AddResetToken. 87 func (mr *MockConnRunnerMockRecorder) AddResetToken(arg0, arg1 any) *MockConnRunnerAddResetTokenCall { 88 mr.mock.ctrl.T.Helper() 89 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddResetToken", reflect.TypeOf((*MockConnRunner)(nil).AddResetToken), arg0, arg1) 90 return &MockConnRunnerAddResetTokenCall{Call: call} 91 } 92 93 // MockConnRunnerAddResetTokenCall wrap *gomock.Call 94 type MockConnRunnerAddResetTokenCall struct { 95 *gomock.Call 96 } 97 98 // Return rewrite *gomock.Call.Return 99 func (c *MockConnRunnerAddResetTokenCall) Return() *MockConnRunnerAddResetTokenCall { 100 c.Call = c.Call.Return() 101 return c 102 } 103 104 // Do rewrite *gomock.Call.Do 105 func (c *MockConnRunnerAddResetTokenCall) Do(f func(protocol.StatelessResetToken, packetHandler)) *MockConnRunnerAddResetTokenCall { 106 c.Call = c.Call.Do(f) 107 return c 108 } 109 110 // DoAndReturn rewrite *gomock.Call.DoAndReturn 111 func (c *MockConnRunnerAddResetTokenCall) DoAndReturn(f func(protocol.StatelessResetToken, packetHandler)) *MockConnRunnerAddResetTokenCall { 112 c.Call = c.Call.DoAndReturn(f) 113 return c 114 } 115 116 // GetStatelessResetToken mocks base method. 117 func (m *MockConnRunner) GetStatelessResetToken(arg0 protocol.ConnectionID) protocol.StatelessResetToken { 118 m.ctrl.T.Helper() 119 ret := m.ctrl.Call(m, "GetStatelessResetToken", arg0) 120 ret0, _ := ret[0].(protocol.StatelessResetToken) 121 return ret0 122 } 123 124 // GetStatelessResetToken indicates an expected call of GetStatelessResetToken. 125 func (mr *MockConnRunnerMockRecorder) GetStatelessResetToken(arg0 any) *MockConnRunnerGetStatelessResetTokenCall { 126 mr.mock.ctrl.T.Helper() 127 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStatelessResetToken", reflect.TypeOf((*MockConnRunner)(nil).GetStatelessResetToken), arg0) 128 return &MockConnRunnerGetStatelessResetTokenCall{Call: call} 129 } 130 131 // MockConnRunnerGetStatelessResetTokenCall wrap *gomock.Call 132 type MockConnRunnerGetStatelessResetTokenCall struct { 133 *gomock.Call 134 } 135 136 // Return rewrite *gomock.Call.Return 137 func (c *MockConnRunnerGetStatelessResetTokenCall) Return(arg0 protocol.StatelessResetToken) *MockConnRunnerGetStatelessResetTokenCall { 138 c.Call = c.Call.Return(arg0) 139 return c 140 } 141 142 // Do rewrite *gomock.Call.Do 143 func (c *MockConnRunnerGetStatelessResetTokenCall) Do(f func(protocol.ConnectionID) protocol.StatelessResetToken) *MockConnRunnerGetStatelessResetTokenCall { 144 c.Call = c.Call.Do(f) 145 return c 146 } 147 148 // DoAndReturn rewrite *gomock.Call.DoAndReturn 149 func (c *MockConnRunnerGetStatelessResetTokenCall) DoAndReturn(f func(protocol.ConnectionID) protocol.StatelessResetToken) *MockConnRunnerGetStatelessResetTokenCall { 150 c.Call = c.Call.DoAndReturn(f) 151 return c 152 } 153 154 // Remove mocks base method. 155 func (m *MockConnRunner) Remove(arg0 protocol.ConnectionID) { 156 m.ctrl.T.Helper() 157 m.ctrl.Call(m, "Remove", arg0) 158 } 159 160 // Remove indicates an expected call of Remove. 161 func (mr *MockConnRunnerMockRecorder) Remove(arg0 any) *MockConnRunnerRemoveCall { 162 mr.mock.ctrl.T.Helper() 163 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Remove", reflect.TypeOf((*MockConnRunner)(nil).Remove), arg0) 164 return &MockConnRunnerRemoveCall{Call: call} 165 } 166 167 // MockConnRunnerRemoveCall wrap *gomock.Call 168 type MockConnRunnerRemoveCall struct { 169 *gomock.Call 170 } 171 172 // Return rewrite *gomock.Call.Return 173 func (c *MockConnRunnerRemoveCall) Return() *MockConnRunnerRemoveCall { 174 c.Call = c.Call.Return() 175 return c 176 } 177 178 // Do rewrite *gomock.Call.Do 179 func (c *MockConnRunnerRemoveCall) Do(f func(protocol.ConnectionID)) *MockConnRunnerRemoveCall { 180 c.Call = c.Call.Do(f) 181 return c 182 } 183 184 // DoAndReturn rewrite *gomock.Call.DoAndReturn 185 func (c *MockConnRunnerRemoveCall) DoAndReturn(f func(protocol.ConnectionID)) *MockConnRunnerRemoveCall { 186 c.Call = c.Call.DoAndReturn(f) 187 return c 188 } 189 190 // RemoveResetToken mocks base method. 191 func (m *MockConnRunner) RemoveResetToken(arg0 protocol.StatelessResetToken) { 192 m.ctrl.T.Helper() 193 m.ctrl.Call(m, "RemoveResetToken", arg0) 194 } 195 196 // RemoveResetToken indicates an expected call of RemoveResetToken. 197 func (mr *MockConnRunnerMockRecorder) RemoveResetToken(arg0 any) *MockConnRunnerRemoveResetTokenCall { 198 mr.mock.ctrl.T.Helper() 199 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveResetToken", reflect.TypeOf((*MockConnRunner)(nil).RemoveResetToken), arg0) 200 return &MockConnRunnerRemoveResetTokenCall{Call: call} 201 } 202 203 // MockConnRunnerRemoveResetTokenCall wrap *gomock.Call 204 type MockConnRunnerRemoveResetTokenCall struct { 205 *gomock.Call 206 } 207 208 // Return rewrite *gomock.Call.Return 209 func (c *MockConnRunnerRemoveResetTokenCall) Return() *MockConnRunnerRemoveResetTokenCall { 210 c.Call = c.Call.Return() 211 return c 212 } 213 214 // Do rewrite *gomock.Call.Do 215 func (c *MockConnRunnerRemoveResetTokenCall) Do(f func(protocol.StatelessResetToken)) *MockConnRunnerRemoveResetTokenCall { 216 c.Call = c.Call.Do(f) 217 return c 218 } 219 220 // DoAndReturn rewrite *gomock.Call.DoAndReturn 221 func (c *MockConnRunnerRemoveResetTokenCall) DoAndReturn(f func(protocol.StatelessResetToken)) *MockConnRunnerRemoveResetTokenCall { 222 c.Call = c.Call.DoAndReturn(f) 223 return c 224 } 225 226 // ReplaceWithClosed mocks base method. 227 func (m *MockConnRunner) ReplaceWithClosed(arg0 []protocol.ConnectionID, arg1 []byte) { 228 m.ctrl.T.Helper() 229 m.ctrl.Call(m, "ReplaceWithClosed", arg0, arg1) 230 } 231 232 // ReplaceWithClosed indicates an expected call of ReplaceWithClosed. 233 func (mr *MockConnRunnerMockRecorder) ReplaceWithClosed(arg0, arg1 any) *MockConnRunnerReplaceWithClosedCall { 234 mr.mock.ctrl.T.Helper() 235 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReplaceWithClosed", reflect.TypeOf((*MockConnRunner)(nil).ReplaceWithClosed), arg0, arg1) 236 return &MockConnRunnerReplaceWithClosedCall{Call: call} 237 } 238 239 // MockConnRunnerReplaceWithClosedCall wrap *gomock.Call 240 type MockConnRunnerReplaceWithClosedCall struct { 241 *gomock.Call 242 } 243 244 // Return rewrite *gomock.Call.Return 245 func (c *MockConnRunnerReplaceWithClosedCall) Return() *MockConnRunnerReplaceWithClosedCall { 246 c.Call = c.Call.Return() 247 return c 248 } 249 250 // Do rewrite *gomock.Call.Do 251 func (c *MockConnRunnerReplaceWithClosedCall) Do(f func([]protocol.ConnectionID, []byte)) *MockConnRunnerReplaceWithClosedCall { 252 c.Call = c.Call.Do(f) 253 return c 254 } 255 256 // DoAndReturn rewrite *gomock.Call.DoAndReturn 257 func (c *MockConnRunnerReplaceWithClosedCall) DoAndReturn(f func([]protocol.ConnectionID, []byte)) *MockConnRunnerReplaceWithClosedCall { 258 c.Call = c.Call.DoAndReturn(f) 259 return c 260 } 261 262 // Retire mocks base method. 263 func (m *MockConnRunner) Retire(arg0 protocol.ConnectionID) { 264 m.ctrl.T.Helper() 265 m.ctrl.Call(m, "Retire", arg0) 266 } 267 268 // Retire indicates an expected call of Retire. 269 func (mr *MockConnRunnerMockRecorder) Retire(arg0 any) *MockConnRunnerRetireCall { 270 mr.mock.ctrl.T.Helper() 271 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Retire", reflect.TypeOf((*MockConnRunner)(nil).Retire), arg0) 272 return &MockConnRunnerRetireCall{Call: call} 273 } 274 275 // MockConnRunnerRetireCall wrap *gomock.Call 276 type MockConnRunnerRetireCall struct { 277 *gomock.Call 278 } 279 280 // Return rewrite *gomock.Call.Return 281 func (c *MockConnRunnerRetireCall) Return() *MockConnRunnerRetireCall { 282 c.Call = c.Call.Return() 283 return c 284 } 285 286 // Do rewrite *gomock.Call.Do 287 func (c *MockConnRunnerRetireCall) Do(f func(protocol.ConnectionID)) *MockConnRunnerRetireCall { 288 c.Call = c.Call.Do(f) 289 return c 290 } 291 292 // DoAndReturn rewrite *gomock.Call.DoAndReturn 293 func (c *MockConnRunnerRetireCall) DoAndReturn(f func(protocol.ConnectionID)) *MockConnRunnerRetireCall { 294 c.Call = c.Call.DoAndReturn(f) 295 return c 296 }