mock_quic_session_test.go 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  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() (Stream, error) {
  34. m.ctrl.T.Helper()
  35. ret := m.ctrl.Call(m, "AcceptStream")
  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() *gomock.Call {
  42. mr.mock.ctrl.T.Helper()
  43. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AcceptStream", reflect.TypeOf((*MockQuicSession)(nil).AcceptStream))
  44. }
  45. // AcceptUniStream mocks base method
  46. func (m *MockQuicSession) AcceptUniStream() (ReceiveStream, error) {
  47. m.ctrl.T.Helper()
  48. ret := m.ctrl.Call(m, "AcceptUniStream")
  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() *gomock.Call {
  55. mr.mock.ctrl.T.Helper()
  56. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AcceptUniStream", reflect.TypeOf((*MockQuicSession)(nil).AcceptUniStream))
  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 error) 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. // LocalAddr mocks base method
  119. func (m *MockQuicSession) LocalAddr() net.Addr {
  120. m.ctrl.T.Helper()
  121. ret := m.ctrl.Call(m, "LocalAddr")
  122. ret0, _ := ret[0].(net.Addr)
  123. return ret0
  124. }
  125. // LocalAddr indicates an expected call of LocalAddr
  126. func (mr *MockQuicSessionMockRecorder) LocalAddr() *gomock.Call {
  127. mr.mock.ctrl.T.Helper()
  128. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LocalAddr", reflect.TypeOf((*MockQuicSession)(nil).LocalAddr))
  129. }
  130. // OpenStream mocks base method
  131. func (m *MockQuicSession) OpenStream() (Stream, error) {
  132. m.ctrl.T.Helper()
  133. ret := m.ctrl.Call(m, "OpenStream")
  134. ret0, _ := ret[0].(Stream)
  135. ret1, _ := ret[1].(error)
  136. return ret0, ret1
  137. }
  138. // OpenStream indicates an expected call of OpenStream
  139. func (mr *MockQuicSessionMockRecorder) OpenStream() *gomock.Call {
  140. mr.mock.ctrl.T.Helper()
  141. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenStream", reflect.TypeOf((*MockQuicSession)(nil).OpenStream))
  142. }
  143. // OpenStreamSync mocks base method
  144. func (m *MockQuicSession) OpenStreamSync() (Stream, error) {
  145. m.ctrl.T.Helper()
  146. ret := m.ctrl.Call(m, "OpenStreamSync")
  147. ret0, _ := ret[0].(Stream)
  148. ret1, _ := ret[1].(error)
  149. return ret0, ret1
  150. }
  151. // OpenStreamSync indicates an expected call of OpenStreamSync
  152. func (mr *MockQuicSessionMockRecorder) OpenStreamSync() *gomock.Call {
  153. mr.mock.ctrl.T.Helper()
  154. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenStreamSync", reflect.TypeOf((*MockQuicSession)(nil).OpenStreamSync))
  155. }
  156. // OpenUniStream mocks base method
  157. func (m *MockQuicSession) OpenUniStream() (SendStream, error) {
  158. m.ctrl.T.Helper()
  159. ret := m.ctrl.Call(m, "OpenUniStream")
  160. ret0, _ := ret[0].(SendStream)
  161. ret1, _ := ret[1].(error)
  162. return ret0, ret1
  163. }
  164. // OpenUniStream indicates an expected call of OpenUniStream
  165. func (mr *MockQuicSessionMockRecorder) OpenUniStream() *gomock.Call {
  166. mr.mock.ctrl.T.Helper()
  167. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenUniStream", reflect.TypeOf((*MockQuicSession)(nil).OpenUniStream))
  168. }
  169. // OpenUniStreamSync mocks base method
  170. func (m *MockQuicSession) OpenUniStreamSync() (SendStream, error) {
  171. m.ctrl.T.Helper()
  172. ret := m.ctrl.Call(m, "OpenUniStreamSync")
  173. ret0, _ := ret[0].(SendStream)
  174. ret1, _ := ret[1].(error)
  175. return ret0, ret1
  176. }
  177. // OpenUniStreamSync indicates an expected call of OpenUniStreamSync
  178. func (mr *MockQuicSessionMockRecorder) OpenUniStreamSync() *gomock.Call {
  179. mr.mock.ctrl.T.Helper()
  180. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenUniStreamSync", reflect.TypeOf((*MockQuicSession)(nil).OpenUniStreamSync))
  181. }
  182. // RemoteAddr mocks base method
  183. func (m *MockQuicSession) RemoteAddr() net.Addr {
  184. m.ctrl.T.Helper()
  185. ret := m.ctrl.Call(m, "RemoteAddr")
  186. ret0, _ := ret[0].(net.Addr)
  187. return ret0
  188. }
  189. // RemoteAddr indicates an expected call of RemoteAddr
  190. func (mr *MockQuicSessionMockRecorder) RemoteAddr() *gomock.Call {
  191. mr.mock.ctrl.T.Helper()
  192. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteAddr", reflect.TypeOf((*MockQuicSession)(nil).RemoteAddr))
  193. }
  194. // closeForRecreating mocks base method
  195. func (m *MockQuicSession) closeForRecreating() protocol.PacketNumber {
  196. m.ctrl.T.Helper()
  197. ret := m.ctrl.Call(m, "closeForRecreating")
  198. ret0, _ := ret[0].(protocol.PacketNumber)
  199. return ret0
  200. }
  201. // closeForRecreating indicates an expected call of closeForRecreating
  202. func (mr *MockQuicSessionMockRecorder) closeForRecreating() *gomock.Call {
  203. mr.mock.ctrl.T.Helper()
  204. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "closeForRecreating", reflect.TypeOf((*MockQuicSession)(nil).closeForRecreating))
  205. }
  206. // closeRemote mocks base method
  207. func (m *MockQuicSession) closeRemote(arg0 error) {
  208. m.ctrl.T.Helper()
  209. m.ctrl.Call(m, "closeRemote", arg0)
  210. }
  211. // closeRemote indicates an expected call of closeRemote
  212. func (mr *MockQuicSessionMockRecorder) closeRemote(arg0 interface{}) *gomock.Call {
  213. mr.mock.ctrl.T.Helper()
  214. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "closeRemote", reflect.TypeOf((*MockQuicSession)(nil).closeRemote), arg0)
  215. }
  216. // destroy mocks base method
  217. func (m *MockQuicSession) destroy(arg0 error) {
  218. m.ctrl.T.Helper()
  219. m.ctrl.Call(m, "destroy", arg0)
  220. }
  221. // destroy indicates an expected call of destroy
  222. func (mr *MockQuicSessionMockRecorder) destroy(arg0 interface{}) *gomock.Call {
  223. mr.mock.ctrl.T.Helper()
  224. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "destroy", reflect.TypeOf((*MockQuicSession)(nil).destroy), arg0)
  225. }
  226. // getPerspective mocks base method
  227. func (m *MockQuicSession) getPerspective() protocol.Perspective {
  228. m.ctrl.T.Helper()
  229. ret := m.ctrl.Call(m, "getPerspective")
  230. ret0, _ := ret[0].(protocol.Perspective)
  231. return ret0
  232. }
  233. // getPerspective indicates an expected call of getPerspective
  234. func (mr *MockQuicSessionMockRecorder) getPerspective() *gomock.Call {
  235. mr.mock.ctrl.T.Helper()
  236. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "getPerspective", reflect.TypeOf((*MockQuicSession)(nil).getPerspective))
  237. }
  238. // handlePacket mocks base method
  239. func (m *MockQuicSession) handlePacket(arg0 *receivedPacket) {
  240. m.ctrl.T.Helper()
  241. m.ctrl.Call(m, "handlePacket", arg0)
  242. }
  243. // handlePacket indicates an expected call of handlePacket
  244. func (mr *MockQuicSessionMockRecorder) handlePacket(arg0 interface{}) *gomock.Call {
  245. mr.mock.ctrl.T.Helper()
  246. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "handlePacket", reflect.TypeOf((*MockQuicSession)(nil).handlePacket), arg0)
  247. }
  248. // run mocks base method
  249. func (m *MockQuicSession) run() error {
  250. m.ctrl.T.Helper()
  251. ret := m.ctrl.Call(m, "run")
  252. ret0, _ := ret[0].(error)
  253. return ret0
  254. }
  255. // run indicates an expected call of run
  256. func (mr *MockQuicSessionMockRecorder) run() *gomock.Call {
  257. mr.mock.ctrl.T.Helper()
  258. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "run", reflect.TypeOf((*MockQuicSession)(nil).run))
  259. }