mock_quic_session_test.go 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  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. net "net"
  8. reflect "reflect"
  9. gomock "github.com/golang/mock/gomock"
  10. handshake "github.com/lucas-clemente/quic-go/internal/handshake"
  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. ret := m.ctrl.Call(m, "AcceptStream")
  35. ret0, _ := ret[0].(Stream)
  36. ret1, _ := ret[1].(error)
  37. return ret0, ret1
  38. }
  39. // AcceptStream indicates an expected call of AcceptStream
  40. func (mr *MockQuicSessionMockRecorder) AcceptStream() *gomock.Call {
  41. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AcceptStream", reflect.TypeOf((*MockQuicSession)(nil).AcceptStream))
  42. }
  43. // AcceptUniStream mocks base method
  44. func (m *MockQuicSession) AcceptUniStream() (ReceiveStream, error) {
  45. ret := m.ctrl.Call(m, "AcceptUniStream")
  46. ret0, _ := ret[0].(ReceiveStream)
  47. ret1, _ := ret[1].(error)
  48. return ret0, ret1
  49. }
  50. // AcceptUniStream indicates an expected call of AcceptUniStream
  51. func (mr *MockQuicSessionMockRecorder) AcceptUniStream() *gomock.Call {
  52. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AcceptUniStream", reflect.TypeOf((*MockQuicSession)(nil).AcceptUniStream))
  53. }
  54. // Close mocks base method
  55. func (m *MockQuicSession) Close() error {
  56. ret := m.ctrl.Call(m, "Close")
  57. ret0, _ := ret[0].(error)
  58. return ret0
  59. }
  60. // Close indicates an expected call of Close
  61. func (mr *MockQuicSessionMockRecorder) Close() *gomock.Call {
  62. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockQuicSession)(nil).Close))
  63. }
  64. // CloseWithError mocks base method
  65. func (m *MockQuicSession) CloseWithError(arg0 protocol.ApplicationErrorCode, arg1 error) error {
  66. ret := m.ctrl.Call(m, "CloseWithError", arg0, arg1)
  67. ret0, _ := ret[0].(error)
  68. return ret0
  69. }
  70. // CloseWithError indicates an expected call of CloseWithError
  71. func (mr *MockQuicSessionMockRecorder) CloseWithError(arg0, arg1 interface{}) *gomock.Call {
  72. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloseWithError", reflect.TypeOf((*MockQuicSession)(nil).CloseWithError), arg0, arg1)
  73. }
  74. // ConnectionState mocks base method
  75. func (m *MockQuicSession) ConnectionState() handshake.ConnectionState {
  76. ret := m.ctrl.Call(m, "ConnectionState")
  77. ret0, _ := ret[0].(handshake.ConnectionState)
  78. return ret0
  79. }
  80. // ConnectionState indicates an expected call of ConnectionState
  81. func (mr *MockQuicSessionMockRecorder) ConnectionState() *gomock.Call {
  82. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConnectionState", reflect.TypeOf((*MockQuicSession)(nil).ConnectionState))
  83. }
  84. // Context mocks base method
  85. func (m *MockQuicSession) Context() context.Context {
  86. ret := m.ctrl.Call(m, "Context")
  87. ret0, _ := ret[0].(context.Context)
  88. return ret0
  89. }
  90. // Context indicates an expected call of Context
  91. func (mr *MockQuicSessionMockRecorder) Context() *gomock.Call {
  92. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockQuicSession)(nil).Context))
  93. }
  94. // GetVersion mocks base method
  95. func (m *MockQuicSession) GetVersion() protocol.VersionNumber {
  96. ret := m.ctrl.Call(m, "GetVersion")
  97. ret0, _ := ret[0].(protocol.VersionNumber)
  98. return ret0
  99. }
  100. // GetVersion indicates an expected call of GetVersion
  101. func (mr *MockQuicSessionMockRecorder) GetVersion() *gomock.Call {
  102. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVersion", reflect.TypeOf((*MockQuicSession)(nil).GetVersion))
  103. }
  104. // LocalAddr mocks base method
  105. func (m *MockQuicSession) LocalAddr() net.Addr {
  106. ret := m.ctrl.Call(m, "LocalAddr")
  107. ret0, _ := ret[0].(net.Addr)
  108. return ret0
  109. }
  110. // LocalAddr indicates an expected call of LocalAddr
  111. func (mr *MockQuicSessionMockRecorder) LocalAddr() *gomock.Call {
  112. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LocalAddr", reflect.TypeOf((*MockQuicSession)(nil).LocalAddr))
  113. }
  114. // OpenStream mocks base method
  115. func (m *MockQuicSession) OpenStream() (Stream, error) {
  116. ret := m.ctrl.Call(m, "OpenStream")
  117. ret0, _ := ret[0].(Stream)
  118. ret1, _ := ret[1].(error)
  119. return ret0, ret1
  120. }
  121. // OpenStream indicates an expected call of OpenStream
  122. func (mr *MockQuicSessionMockRecorder) OpenStream() *gomock.Call {
  123. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenStream", reflect.TypeOf((*MockQuicSession)(nil).OpenStream))
  124. }
  125. // OpenStreamSync mocks base method
  126. func (m *MockQuicSession) OpenStreamSync() (Stream, error) {
  127. ret := m.ctrl.Call(m, "OpenStreamSync")
  128. ret0, _ := ret[0].(Stream)
  129. ret1, _ := ret[1].(error)
  130. return ret0, ret1
  131. }
  132. // OpenStreamSync indicates an expected call of OpenStreamSync
  133. func (mr *MockQuicSessionMockRecorder) OpenStreamSync() *gomock.Call {
  134. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenStreamSync", reflect.TypeOf((*MockQuicSession)(nil).OpenStreamSync))
  135. }
  136. // OpenUniStream mocks base method
  137. func (m *MockQuicSession) OpenUniStream() (SendStream, error) {
  138. ret := m.ctrl.Call(m, "OpenUniStream")
  139. ret0, _ := ret[0].(SendStream)
  140. ret1, _ := ret[1].(error)
  141. return ret0, ret1
  142. }
  143. // OpenUniStream indicates an expected call of OpenUniStream
  144. func (mr *MockQuicSessionMockRecorder) OpenUniStream() *gomock.Call {
  145. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenUniStream", reflect.TypeOf((*MockQuicSession)(nil).OpenUniStream))
  146. }
  147. // OpenUniStreamSync mocks base method
  148. func (m *MockQuicSession) OpenUniStreamSync() (SendStream, error) {
  149. ret := m.ctrl.Call(m, "OpenUniStreamSync")
  150. ret0, _ := ret[0].(SendStream)
  151. ret1, _ := ret[1].(error)
  152. return ret0, ret1
  153. }
  154. // OpenUniStreamSync indicates an expected call of OpenUniStreamSync
  155. func (mr *MockQuicSessionMockRecorder) OpenUniStreamSync() *gomock.Call {
  156. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenUniStreamSync", reflect.TypeOf((*MockQuicSession)(nil).OpenUniStreamSync))
  157. }
  158. // RemoteAddr mocks base method
  159. func (m *MockQuicSession) RemoteAddr() net.Addr {
  160. ret := m.ctrl.Call(m, "RemoteAddr")
  161. ret0, _ := ret[0].(net.Addr)
  162. return ret0
  163. }
  164. // RemoteAddr indicates an expected call of RemoteAddr
  165. func (mr *MockQuicSessionMockRecorder) RemoteAddr() *gomock.Call {
  166. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteAddr", reflect.TypeOf((*MockQuicSession)(nil).RemoteAddr))
  167. }
  168. // closeForRecreating mocks base method
  169. func (m *MockQuicSession) closeForRecreating() protocol.PacketNumber {
  170. ret := m.ctrl.Call(m, "closeForRecreating")
  171. ret0, _ := ret[0].(protocol.PacketNumber)
  172. return ret0
  173. }
  174. // closeForRecreating indicates an expected call of closeForRecreating
  175. func (mr *MockQuicSessionMockRecorder) closeForRecreating() *gomock.Call {
  176. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "closeForRecreating", reflect.TypeOf((*MockQuicSession)(nil).closeForRecreating))
  177. }
  178. // closeRemote mocks base method
  179. func (m *MockQuicSession) closeRemote(arg0 error) {
  180. m.ctrl.Call(m, "closeRemote", arg0)
  181. }
  182. // closeRemote indicates an expected call of closeRemote
  183. func (mr *MockQuicSessionMockRecorder) closeRemote(arg0 interface{}) *gomock.Call {
  184. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "closeRemote", reflect.TypeOf((*MockQuicSession)(nil).closeRemote), arg0)
  185. }
  186. // destroy mocks base method
  187. func (m *MockQuicSession) destroy(arg0 error) {
  188. m.ctrl.Call(m, "destroy", arg0)
  189. }
  190. // destroy indicates an expected call of destroy
  191. func (mr *MockQuicSessionMockRecorder) destroy(arg0 interface{}) *gomock.Call {
  192. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "destroy", reflect.TypeOf((*MockQuicSession)(nil).destroy), arg0)
  193. }
  194. // handlePacket mocks base method
  195. func (m *MockQuicSession) handlePacket(arg0 *receivedPacket) {
  196. m.ctrl.Call(m, "handlePacket", arg0)
  197. }
  198. // handlePacket indicates an expected call of handlePacket
  199. func (mr *MockQuicSessionMockRecorder) handlePacket(arg0 interface{}) *gomock.Call {
  200. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "handlePacket", reflect.TypeOf((*MockQuicSession)(nil).handlePacket), arg0)
  201. }
  202. // run mocks base method
  203. func (m *MockQuicSession) run() error {
  204. ret := m.ctrl.Call(m, "run")
  205. ret0, _ := ret[0].(error)
  206. return ret0
  207. }
  208. // run indicates an expected call of run
  209. func (mr *MockQuicSessionMockRecorder) run() *gomock.Call {
  210. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "run", reflect.TypeOf((*MockQuicSession)(nil).run))
  211. }