github.com/tumi8/quic-go@v0.37.4-tum/mock_quic_conn_test.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: github.com/tumi8/quic-go (interfaces: QUICConn) 3 4 // Package quic is a generated GoMock package. 5 package quic 6 7 import ( 8 context "context" 9 net "net" 10 reflect "reflect" 11 12 gomock "github.com/golang/mock/gomock" 13 protocol "github.com/tumi8/quic-go/noninternal/protocol" 14 qerr "github.com/tumi8/quic-go/noninternal/qerr" 15 ) 16 17 // MockQUICConn is a mock of QUICConn interface. 18 type MockQUICConn struct { 19 ctrl *gomock.Controller 20 recorder *MockQUICConnMockRecorder 21 } 22 23 // MockQUICConnMockRecorder is the mock recorder for MockQUICConn. 24 type MockQUICConnMockRecorder struct { 25 mock *MockQUICConn 26 } 27 28 // NewMockQUICConn creates a new mock instance. 29 func NewMockQUICConn(ctrl *gomock.Controller) *MockQUICConn { 30 mock := &MockQUICConn{ctrl: ctrl} 31 mock.recorder = &MockQUICConnMockRecorder{mock} 32 return mock 33 } 34 35 // EXPECT returns an object that allows the caller to indicate expected use. 36 func (m *MockQUICConn) EXPECT() *MockQUICConnMockRecorder { 37 return m.recorder 38 } 39 40 // AcceptStream mocks base method. 41 func (m *MockQUICConn) AcceptStream(arg0 context.Context) (Stream, error) { 42 m.ctrl.T.Helper() 43 ret := m.ctrl.Call(m, "AcceptStream", arg0) 44 ret0, _ := ret[0].(Stream) 45 ret1, _ := ret[1].(error) 46 return ret0, ret1 47 } 48 49 // AcceptStream indicates an expected call of AcceptStream. 50 func (mr *MockQUICConnMockRecorder) AcceptStream(arg0 interface{}) *gomock.Call { 51 mr.mock.ctrl.T.Helper() 52 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AcceptStream", reflect.TypeOf((*MockQUICConn)(nil).AcceptStream), arg0) 53 } 54 55 // AcceptUniStream mocks base method. 56 func (m *MockQUICConn) AcceptUniStream(arg0 context.Context) (ReceiveStream, error) { 57 m.ctrl.T.Helper() 58 ret := m.ctrl.Call(m, "AcceptUniStream", arg0) 59 ret0, _ := ret[0].(ReceiveStream) 60 ret1, _ := ret[1].(error) 61 return ret0, ret1 62 } 63 64 // AcceptUniStream indicates an expected call of AcceptUniStream. 65 func (mr *MockQUICConnMockRecorder) AcceptUniStream(arg0 interface{}) *gomock.Call { 66 mr.mock.ctrl.T.Helper() 67 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AcceptUniStream", reflect.TypeOf((*MockQUICConn)(nil).AcceptUniStream), arg0) 68 } 69 70 // CloseWithError mocks base method. 71 func (m *MockQUICConn) CloseWithError(arg0 qerr.ApplicationErrorCode, arg1 string) error { 72 m.ctrl.T.Helper() 73 ret := m.ctrl.Call(m, "CloseWithError", arg0, arg1) 74 ret0, _ := ret[0].(error) 75 return ret0 76 } 77 78 // CloseWithError indicates an expected call of CloseWithError. 79 func (mr *MockQUICConnMockRecorder) CloseWithError(arg0, arg1 interface{}) *gomock.Call { 80 mr.mock.ctrl.T.Helper() 81 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloseWithError", reflect.TypeOf((*MockQUICConn)(nil).CloseWithError), arg0, arg1) 82 } 83 84 // ConnectionState mocks base method. 85 func (m *MockQUICConn) ConnectionState() ConnectionState { 86 m.ctrl.T.Helper() 87 ret := m.ctrl.Call(m, "ConnectionState") 88 ret0, _ := ret[0].(ConnectionState) 89 return ret0 90 } 91 92 // ConnectionState indicates an expected call of ConnectionState. 93 func (mr *MockQUICConnMockRecorder) ConnectionState() *gomock.Call { 94 mr.mock.ctrl.T.Helper() 95 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectionState", reflect.TypeOf((*MockQUICConn)(nil).ConnectionState)) 96 } 97 98 // Context mocks base method. 99 func (m *MockQUICConn) Context() context.Context { 100 m.ctrl.T.Helper() 101 ret := m.ctrl.Call(m, "Context") 102 ret0, _ := ret[0].(context.Context) 103 return ret0 104 } 105 106 // Context indicates an expected call of Context. 107 func (mr *MockQUICConnMockRecorder) Context() *gomock.Call { 108 mr.mock.ctrl.T.Helper() 109 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockQUICConn)(nil).Context)) 110 } 111 112 // GetVersion mocks base method. 113 func (m *MockQUICConn) GetVersion() protocol.VersionNumber { 114 m.ctrl.T.Helper() 115 ret := m.ctrl.Call(m, "GetVersion") 116 ret0, _ := ret[0].(protocol.VersionNumber) 117 return ret0 118 } 119 120 // GetVersion indicates an expected call of GetVersion. 121 func (mr *MockQUICConnMockRecorder) GetVersion() *gomock.Call { 122 mr.mock.ctrl.T.Helper() 123 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVersion", reflect.TypeOf((*MockQUICConn)(nil).GetVersion)) 124 } 125 126 // HandshakeComplete mocks base method. 127 func (m *MockQUICConn) HandshakeComplete() <-chan struct{} { 128 m.ctrl.T.Helper() 129 ret := m.ctrl.Call(m, "HandshakeComplete") 130 ret0, _ := ret[0].(<-chan struct{}) 131 return ret0 132 } 133 134 // HandshakeComplete indicates an expected call of HandshakeComplete. 135 func (mr *MockQUICConnMockRecorder) HandshakeComplete() *gomock.Call { 136 mr.mock.ctrl.T.Helper() 137 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandshakeComplete", reflect.TypeOf((*MockQUICConn)(nil).HandshakeComplete)) 138 } 139 140 // LocalAddr mocks base method. 141 func (m *MockQUICConn) LocalAddr() net.Addr { 142 m.ctrl.T.Helper() 143 ret := m.ctrl.Call(m, "LocalAddr") 144 ret0, _ := ret[0].(net.Addr) 145 return ret0 146 } 147 148 // LocalAddr indicates an expected call of LocalAddr. 149 func (mr *MockQUICConnMockRecorder) LocalAddr() *gomock.Call { 150 mr.mock.ctrl.T.Helper() 151 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LocalAddr", reflect.TypeOf((*MockQUICConn)(nil).LocalAddr)) 152 } 153 154 // NextConnection mocks base method. 155 func (m *MockQUICConn) NextConnection() Connection { 156 m.ctrl.T.Helper() 157 ret := m.ctrl.Call(m, "NextConnection") 158 ret0, _ := ret[0].(Connection) 159 return ret0 160 } 161 162 // NextConnection indicates an expected call of NextConnection. 163 func (mr *MockQUICConnMockRecorder) NextConnection() *gomock.Call { 164 mr.mock.ctrl.T.Helper() 165 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NextConnection", reflect.TypeOf((*MockQUICConn)(nil).NextConnection)) 166 } 167 168 // NextConnection mocks base method. 169 func (m *MockQUICConn) GetConnection() *connection { 170 m.ctrl.T.Helper() 171 ret := m.ctrl.Call(m, "GetConnection") 172 ret0, _ := ret[0].(*connection) 173 return ret0 174 } 175 176 // OpenStream mocks base method. 177 func (m *MockQUICConn) OpenStream() (Stream, error) { 178 m.ctrl.T.Helper() 179 ret := m.ctrl.Call(m, "OpenStream") 180 ret0, _ := ret[0].(Stream) 181 ret1, _ := ret[1].(error) 182 return ret0, ret1 183 } 184 185 // OpenStream indicates an expected call of OpenStream. 186 func (mr *MockQUICConnMockRecorder) OpenStream() *gomock.Call { 187 mr.mock.ctrl.T.Helper() 188 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenStream", reflect.TypeOf((*MockQUICConn)(nil).OpenStream)) 189 } 190 191 // OpenStreamSync mocks base method. 192 func (m *MockQUICConn) OpenStreamSync(arg0 context.Context) (Stream, error) { 193 m.ctrl.T.Helper() 194 ret := m.ctrl.Call(m, "OpenStreamSync", arg0) 195 ret0, _ := ret[0].(Stream) 196 ret1, _ := ret[1].(error) 197 return ret0, ret1 198 } 199 200 // OpenStreamSync indicates an expected call of OpenStreamSync. 201 func (mr *MockQUICConnMockRecorder) OpenStreamSync(arg0 interface{}) *gomock.Call { 202 mr.mock.ctrl.T.Helper() 203 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenStreamSync", reflect.TypeOf((*MockQUICConn)(nil).OpenStreamSync), arg0) 204 } 205 206 // OpenUniStream mocks base method. 207 func (m *MockQUICConn) OpenUniStream() (SendStream, error) { 208 m.ctrl.T.Helper() 209 ret := m.ctrl.Call(m, "OpenUniStream") 210 ret0, _ := ret[0].(SendStream) 211 ret1, _ := ret[1].(error) 212 return ret0, ret1 213 } 214 215 // OpenUniStream indicates an expected call of OpenUniStream. 216 func (mr *MockQUICConnMockRecorder) OpenUniStream() *gomock.Call { 217 mr.mock.ctrl.T.Helper() 218 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenUniStream", reflect.TypeOf((*MockQUICConn)(nil).OpenUniStream)) 219 } 220 221 // OpenUniStreamSync mocks base method. 222 func (m *MockQUICConn) OpenUniStreamSync(arg0 context.Context) (SendStream, error) { 223 m.ctrl.T.Helper() 224 ret := m.ctrl.Call(m, "OpenUniStreamSync", arg0) 225 ret0, _ := ret[0].(SendStream) 226 ret1, _ := ret[1].(error) 227 return ret0, ret1 228 } 229 230 // OpenUniStreamSync indicates an expected call of OpenUniStreamSync. 231 func (mr *MockQUICConnMockRecorder) OpenUniStreamSync(arg0 interface{}) *gomock.Call { 232 mr.mock.ctrl.T.Helper() 233 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenUniStreamSync", reflect.TypeOf((*MockQUICConn)(nil).OpenUniStreamSync), arg0) 234 } 235 236 // ReceiveMessage mocks base method. 237 func (m *MockQUICConn) ReceiveMessage(arg0 context.Context) ([]byte, error) { 238 m.ctrl.T.Helper() 239 ret := m.ctrl.Call(m, "ReceiveMessage", arg0) 240 ret0, _ := ret[0].([]byte) 241 ret1, _ := ret[1].(error) 242 return ret0, ret1 243 } 244 245 // ReceiveMessage indicates an expected call of ReceiveMessage. 246 func (mr *MockQUICConnMockRecorder) ReceiveMessage(arg0 interface{}) *gomock.Call { 247 mr.mock.ctrl.T.Helper() 248 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReceiveMessage", reflect.TypeOf((*MockQUICConn)(nil).ReceiveMessage), arg0) 249 } 250 251 // RemoteAddr mocks base method. 252 func (m *MockQUICConn) RemoteAddr() net.Addr { 253 m.ctrl.T.Helper() 254 ret := m.ctrl.Call(m, "RemoteAddr") 255 ret0, _ := ret[0].(net.Addr) 256 return ret0 257 } 258 259 // RemoteAddr indicates an expected call of RemoteAddr. 260 func (mr *MockQUICConnMockRecorder) RemoteAddr() *gomock.Call { 261 mr.mock.ctrl.T.Helper() 262 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteAddr", reflect.TypeOf((*MockQUICConn)(nil).RemoteAddr)) 263 } 264 265 // SendMessage mocks base method. 266 func (m *MockQUICConn) SendMessage(arg0 []byte) error { 267 m.ctrl.T.Helper() 268 ret := m.ctrl.Call(m, "SendMessage", arg0) 269 ret0, _ := ret[0].(error) 270 return ret0 271 } 272 273 // SendMessage indicates an expected call of SendMessage. 274 func (mr *MockQUICConnMockRecorder) SendMessage(arg0 interface{}) *gomock.Call { 275 mr.mock.ctrl.T.Helper() 276 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMessage", reflect.TypeOf((*MockQUICConn)(nil).SendMessage), arg0) 277 } 278 279 // destroy mocks base method. 280 func (m *MockQUICConn) destroy(arg0 error) { 281 m.ctrl.T.Helper() 282 m.ctrl.Call(m, "destroy", arg0) 283 } 284 285 // destroy indicates an expected call of destroy. 286 func (mr *MockQUICConnMockRecorder) destroy(arg0 interface{}) *gomock.Call { 287 mr.mock.ctrl.T.Helper() 288 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "destroy", reflect.TypeOf((*MockQUICConn)(nil).destroy), arg0) 289 } 290 291 // earlyConnReady mocks base method. 292 func (m *MockQUICConn) earlyConnReady() <-chan struct{} { 293 m.ctrl.T.Helper() 294 ret := m.ctrl.Call(m, "earlyConnReady") 295 ret0, _ := ret[0].(<-chan struct{}) 296 return ret0 297 } 298 299 // earlyConnReady indicates an expected call of earlyConnReady. 300 func (mr *MockQUICConnMockRecorder) earlyConnReady() *gomock.Call { 301 mr.mock.ctrl.T.Helper() 302 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "earlyConnReady", reflect.TypeOf((*MockQUICConn)(nil).earlyConnReady)) 303 } 304 305 // getPerspective mocks base method. 306 func (m *MockQUICConn) getPerspective() protocol.Perspective { 307 m.ctrl.T.Helper() 308 ret := m.ctrl.Call(m, "getPerspective") 309 ret0, _ := ret[0].(protocol.Perspective) 310 return ret0 311 } 312 313 // getPerspective indicates an expected call of getPerspective. 314 func (mr *MockQUICConnMockRecorder) getPerspective() *gomock.Call { 315 mr.mock.ctrl.T.Helper() 316 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "getPerspective", reflect.TypeOf((*MockQUICConn)(nil).getPerspective)) 317 } 318 319 // handlePacket mocks base method. 320 func (m *MockQUICConn) handlePacket(arg0 receivedPacket) { 321 m.ctrl.T.Helper() 322 m.ctrl.Call(m, "handlePacket", arg0) 323 } 324 325 // handlePacket indicates an expected call of handlePacket. 326 func (mr *MockQUICConnMockRecorder) handlePacket(arg0 interface{}) *gomock.Call { 327 mr.mock.ctrl.T.Helper() 328 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "handlePacket", reflect.TypeOf((*MockQUICConn)(nil).handlePacket), arg0) 329 } 330 331 // run mocks base method. 332 func (m *MockQUICConn) run() error { 333 m.ctrl.T.Helper() 334 ret := m.ctrl.Call(m, "run") 335 ret0, _ := ret[0].(error) 336 return ret0 337 } 338 339 // run indicates an expected call of run. 340 func (mr *MockQUICConnMockRecorder) run() *gomock.Call { 341 mr.mock.ctrl.T.Helper() 342 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "run", reflect.TypeOf((*MockQUICConn)(nil).run)) 343 } 344 345 // shutdown mocks base method. 346 func (m *MockQUICConn) shutdown() { 347 m.ctrl.T.Helper() 348 m.ctrl.Call(m, "shutdown") 349 } 350 351 // shutdown indicates an expected call of shutdown. 352 func (mr *MockQUICConnMockRecorder) shutdown() *gomock.Call { 353 mr.mock.ctrl.T.Helper() 354 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "shutdown", reflect.TypeOf((*MockQUICConn)(nil).shutdown)) 355 }