mock_quic_session_test.go 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332
  1. // Code generated by MockGen. DO NOT EDIT.
  2. // Source: github.com/lucas-clemente/quic-go (interfaces: QuicSession)
  3. // Package quic is a generated GoMock package.
  4. package quic
  5. import (
  6. context "context"
  7. tls "crypto/tls"
  8. net "net"
  9. reflect "reflect"
  10. gomock "github.com/golang/mock/gomock"
  11. protocol "github.com/lucas-clemente/quic-go/internal/protocol"
  12. )
  13. // MockQuicSession is a mock of QuicSession interface
  14. type MockQuicSession struct {
  15. ctrl *gomock.Controller
  16. recorder *MockQuicSessionMockRecorder
  17. }
  18. // MockQuicSessionMockRecorder is the mock recorder for MockQuicSession
  19. type MockQuicSessionMockRecorder struct {
  20. mock *MockQuicSession
  21. }
  22. // NewMockQuicSession creates a new mock instance
  23. func NewMockQuicSession(ctrl *gomock.Controller) *MockQuicSession {
  24. mock := &MockQuicSession{ctrl: ctrl}
  25. mock.recorder = &MockQuicSessionMockRecorder{mock}
  26. return mock
  27. }
  28. // EXPECT returns an object that allows the caller to indicate expected use
  29. func (m *MockQuicSession) EXPECT() *MockQuicSessionMockRecorder {
  30. return m.recorder
  31. }
  32. // AcceptStream mocks base method
  33. func (m *MockQuicSession) AcceptStream(arg0 context.Context) (Stream, error) {
  34. m.ctrl.T.Helper()
  35. ret := m.ctrl.Call(m, "AcceptStream", arg0)
  36. ret0, _ := ret[0].(Stream)
  37. ret1, _ := ret[1].(error)
  38. return ret0, ret1
  39. }
  40. // AcceptStream indicates an expected call of AcceptStream
  41. func (mr *MockQuicSessionMockRecorder) AcceptStream(arg0 interface{}) *gomock.Call {
  42. mr.mock.ctrl.T.Helper()
  43. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AcceptStream", reflect.TypeOf((*MockQuicSession)(nil).AcceptStream), arg0)
  44. }
  45. // AcceptUniStream mocks base method
  46. func (m *MockQuicSession) AcceptUniStream(arg0 context.Context) (ReceiveStream, error) {
  47. m.ctrl.T.Helper()
  48. ret := m.ctrl.Call(m, "AcceptUniStream", arg0)
  49. ret0, _ := ret[0].(ReceiveStream)
  50. ret1, _ := ret[1].(error)
  51. return ret0, ret1
  52. }
  53. // AcceptUniStream indicates an expected call of AcceptUniStream
  54. func (mr *MockQuicSessionMockRecorder) AcceptUniStream(arg0 interface{}) *gomock.Call {
  55. mr.mock.ctrl.T.Helper()
  56. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AcceptUniStream", reflect.TypeOf((*MockQuicSession)(nil).AcceptUniStream), arg0)
  57. }
  58. // Close mocks base method
  59. func (m *MockQuicSession) Close() error {
  60. m.ctrl.T.Helper()
  61. ret := m.ctrl.Call(m, "Close")
  62. ret0, _ := ret[0].(error)
  63. return ret0
  64. }
  65. // Close indicates an expected call of Close
  66. func (mr *MockQuicSessionMockRecorder) Close() *gomock.Call {
  67. mr.mock.ctrl.T.Helper()
  68. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockQuicSession)(nil).Close))
  69. }
  70. // CloseWithError mocks base method
  71. func (m *MockQuicSession) CloseWithError(arg0 protocol.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. // CloseWithError indicates an expected call of CloseWithError
  78. func (mr *MockQuicSessionMockRecorder) CloseWithError(arg0, arg1 interface{}) *gomock.Call {
  79. mr.mock.ctrl.T.Helper()
  80. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloseWithError", reflect.TypeOf((*MockQuicSession)(nil).CloseWithError), arg0, arg1)
  81. }
  82. // ConnectionState mocks base method
  83. func (m *MockQuicSession) ConnectionState() tls.ConnectionState {
  84. m.ctrl.T.Helper()
  85. ret := m.ctrl.Call(m, "ConnectionState")
  86. ret0, _ := ret[0].(tls.ConnectionState)
  87. return ret0
  88. }
  89. // ConnectionState indicates an expected call of ConnectionState
  90. func (mr *MockQuicSessionMockRecorder) ConnectionState() *gomock.Call {
  91. mr.mock.ctrl.T.Helper()
  92. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectionState", reflect.TypeOf((*MockQuicSession)(nil).ConnectionState))
  93. }
  94. // Context mocks base method
  95. func (m *MockQuicSession) Context() context.Context {
  96. m.ctrl.T.Helper()
  97. ret := m.ctrl.Call(m, "Context")
  98. ret0, _ := ret[0].(context.Context)
  99. return ret0
  100. }
  101. // Context indicates an expected call of Context
  102. func (mr *MockQuicSessionMockRecorder) Context() *gomock.Call {
  103. mr.mock.ctrl.T.Helper()
  104. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockQuicSession)(nil).Context))
  105. }
  106. // GetVersion mocks base method
  107. func (m *MockQuicSession) GetVersion() protocol.VersionNumber {
  108. m.ctrl.T.Helper()
  109. ret := m.ctrl.Call(m, "GetVersion")
  110. ret0, _ := ret[0].(protocol.VersionNumber)
  111. return ret0
  112. }
  113. // GetVersion indicates an expected call of GetVersion
  114. func (mr *MockQuicSessionMockRecorder) GetVersion() *gomock.Call {
  115. mr.mock.ctrl.T.Helper()
  116. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVersion", reflect.TypeOf((*MockQuicSession)(nil).GetVersion))
  117. }
  118. // HandshakeComplete mocks base method
  119. func (m *MockQuicSession) HandshakeComplete() context.Context {
  120. m.ctrl.T.Helper()
  121. ret := m.ctrl.Call(m, "HandshakeComplete")
  122. ret0, _ := ret[0].(context.Context)
  123. return ret0
  124. }
  125. // HandshakeComplete indicates an expected call of HandshakeComplete
  126. func (mr *MockQuicSessionMockRecorder) HandshakeComplete() *gomock.Call {
  127. mr.mock.ctrl.T.Helper()
  128. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandshakeComplete", reflect.TypeOf((*MockQuicSession)(nil).HandshakeComplete))
  129. }
  130. // LocalAddr mocks base method
  131. func (m *MockQuicSession) LocalAddr() net.Addr {
  132. m.ctrl.T.Helper()
  133. ret := m.ctrl.Call(m, "LocalAddr")
  134. ret0, _ := ret[0].(net.Addr)
  135. return ret0
  136. }
  137. // LocalAddr indicates an expected call of LocalAddr
  138. func (mr *MockQuicSessionMockRecorder) LocalAddr() *gomock.Call {
  139. mr.mock.ctrl.T.Helper()
  140. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LocalAddr", reflect.TypeOf((*MockQuicSession)(nil).LocalAddr))
  141. }
  142. // OpenStream mocks base method
  143. func (m *MockQuicSession) OpenStream() (Stream, error) {
  144. m.ctrl.T.Helper()
  145. ret := m.ctrl.Call(m, "OpenStream")
  146. ret0, _ := ret[0].(Stream)
  147. ret1, _ := ret[1].(error)
  148. return ret0, ret1
  149. }
  150. // OpenStream indicates an expected call of OpenStream
  151. func (mr *MockQuicSessionMockRecorder) OpenStream() *gomock.Call {
  152. mr.mock.ctrl.T.Helper()
  153. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenStream", reflect.TypeOf((*MockQuicSession)(nil).OpenStream))
  154. }
  155. // OpenStreamSync mocks base method
  156. func (m *MockQuicSession) OpenStreamSync(arg0 context.Context) (Stream, error) {
  157. m.ctrl.T.Helper()
  158. ret := m.ctrl.Call(m, "OpenStreamSync", arg0)
  159. ret0, _ := ret[0].(Stream)
  160. ret1, _ := ret[1].(error)
  161. return ret0, ret1
  162. }
  163. // OpenStreamSync indicates an expected call of OpenStreamSync
  164. func (mr *MockQuicSessionMockRecorder) OpenStreamSync(arg0 interface{}) *gomock.Call {
  165. mr.mock.ctrl.T.Helper()
  166. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenStreamSync", reflect.TypeOf((*MockQuicSession)(nil).OpenStreamSync), arg0)
  167. }
  168. // OpenUniStream mocks base method
  169. func (m *MockQuicSession) OpenUniStream() (SendStream, error) {
  170. m.ctrl.T.Helper()
  171. ret := m.ctrl.Call(m, "OpenUniStream")
  172. ret0, _ := ret[0].(SendStream)
  173. ret1, _ := ret[1].(error)
  174. return ret0, ret1
  175. }
  176. // OpenUniStream indicates an expected call of OpenUniStream
  177. func (mr *MockQuicSessionMockRecorder) OpenUniStream() *gomock.Call {
  178. mr.mock.ctrl.T.Helper()
  179. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenUniStream", reflect.TypeOf((*MockQuicSession)(nil).OpenUniStream))
  180. }
  181. // OpenUniStreamSync mocks base method
  182. func (m *MockQuicSession) OpenUniStreamSync(arg0 context.Context) (SendStream, error) {
  183. m.ctrl.T.Helper()
  184. ret := m.ctrl.Call(m, "OpenUniStreamSync", arg0)
  185. ret0, _ := ret[0].(SendStream)
  186. ret1, _ := ret[1].(error)
  187. return ret0, ret1
  188. }
  189. // OpenUniStreamSync indicates an expected call of OpenUniStreamSync
  190. func (mr *MockQuicSessionMockRecorder) OpenUniStreamSync(arg0 interface{}) *gomock.Call {
  191. mr.mock.ctrl.T.Helper()
  192. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenUniStreamSync", reflect.TypeOf((*MockQuicSession)(nil).OpenUniStreamSync), arg0)
  193. }
  194. // RemoteAddr mocks base method
  195. func (m *MockQuicSession) RemoteAddr() net.Addr {
  196. m.ctrl.T.Helper()
  197. ret := m.ctrl.Call(m, "RemoteAddr")
  198. ret0, _ := ret[0].(net.Addr)
  199. return ret0
  200. }
  201. // RemoteAddr indicates an expected call of RemoteAddr
  202. func (mr *MockQuicSessionMockRecorder) RemoteAddr() *gomock.Call {
  203. mr.mock.ctrl.T.Helper()
  204. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteAddr", reflect.TypeOf((*MockQuicSession)(nil).RemoteAddr))
  205. }
  206. // closeForRecreating mocks base method
  207. func (m *MockQuicSession) closeForRecreating() protocol.PacketNumber {
  208. m.ctrl.T.Helper()
  209. ret := m.ctrl.Call(m, "closeForRecreating")
  210. ret0, _ := ret[0].(protocol.PacketNumber)
  211. return ret0
  212. }
  213. // closeForRecreating indicates an expected call of closeForRecreating
  214. func (mr *MockQuicSessionMockRecorder) closeForRecreating() *gomock.Call {
  215. mr.mock.ctrl.T.Helper()
  216. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "closeForRecreating", reflect.TypeOf((*MockQuicSession)(nil).closeForRecreating))
  217. }
  218. // closeRemote mocks base method
  219. func (m *MockQuicSession) closeRemote(arg0 error) {
  220. m.ctrl.T.Helper()
  221. m.ctrl.Call(m, "closeRemote", arg0)
  222. }
  223. // closeRemote indicates an expected call of closeRemote
  224. func (mr *MockQuicSessionMockRecorder) closeRemote(arg0 interface{}) *gomock.Call {
  225. mr.mock.ctrl.T.Helper()
  226. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "closeRemote", reflect.TypeOf((*MockQuicSession)(nil).closeRemote), arg0)
  227. }
  228. // destroy mocks base method
  229. func (m *MockQuicSession) destroy(arg0 error) {
  230. m.ctrl.T.Helper()
  231. m.ctrl.Call(m, "destroy", arg0)
  232. }
  233. // destroy indicates an expected call of destroy
  234. func (mr *MockQuicSessionMockRecorder) destroy(arg0 interface{}) *gomock.Call {
  235. mr.mock.ctrl.T.Helper()
  236. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "destroy", reflect.TypeOf((*MockQuicSession)(nil).destroy), arg0)
  237. }
  238. // earlySessionReady mocks base method
  239. func (m *MockQuicSession) earlySessionReady() <-chan struct{} {
  240. m.ctrl.T.Helper()
  241. ret := m.ctrl.Call(m, "earlySessionReady")
  242. ret0, _ := ret[0].(<-chan struct{})
  243. return ret0
  244. }
  245. // earlySessionReady indicates an expected call of earlySessionReady
  246. func (mr *MockQuicSessionMockRecorder) earlySessionReady() *gomock.Call {
  247. mr.mock.ctrl.T.Helper()
  248. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "earlySessionReady", reflect.TypeOf((*MockQuicSession)(nil).earlySessionReady))
  249. }
  250. // getPerspective mocks base method
  251. func (m *MockQuicSession) getPerspective() protocol.Perspective {
  252. m.ctrl.T.Helper()
  253. ret := m.ctrl.Call(m, "getPerspective")
  254. ret0, _ := ret[0].(protocol.Perspective)
  255. return ret0
  256. }
  257. // getPerspective indicates an expected call of getPerspective
  258. func (mr *MockQuicSessionMockRecorder) getPerspective() *gomock.Call {
  259. mr.mock.ctrl.T.Helper()
  260. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "getPerspective", reflect.TypeOf((*MockQuicSession)(nil).getPerspective))
  261. }
  262. // handlePacket mocks base method
  263. func (m *MockQuicSession) handlePacket(arg0 *receivedPacket) {
  264. m.ctrl.T.Helper()
  265. m.ctrl.Call(m, "handlePacket", arg0)
  266. }
  267. // handlePacket indicates an expected call of handlePacket
  268. func (mr *MockQuicSessionMockRecorder) handlePacket(arg0 interface{}) *gomock.Call {
  269. mr.mock.ctrl.T.Helper()
  270. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "handlePacket", reflect.TypeOf((*MockQuicSession)(nil).handlePacket), arg0)
  271. }
  272. // run mocks base method
  273. func (m *MockQuicSession) run() error {
  274. m.ctrl.T.Helper()
  275. ret := m.ctrl.Call(m, "run")
  276. ret0, _ := ret[0].(error)
  277. return ret0
  278. }
  279. // run indicates an expected call of run
  280. func (mr *MockQuicSessionMockRecorder) run() *gomock.Call {
  281. mr.mock.ctrl.T.Helper()
  282. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "run", reflect.TypeOf((*MockQuicSession)(nil).run))
  283. }