mock_stream_manager_test.go 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. // Code generated by MockGen. DO NOT EDIT.
  2. // Source: github.com/lucas-clemente/quic-go (interfaces: StreamManager)
  3. // Package quic is a generated GoMock package.
  4. package quic
  5. import (
  6. context "context"
  7. reflect "reflect"
  8. gomock "github.com/golang/mock/gomock"
  9. handshake "github.com/lucas-clemente/quic-go/internal/handshake"
  10. protocol "github.com/lucas-clemente/quic-go/internal/protocol"
  11. wire "github.com/lucas-clemente/quic-go/internal/wire"
  12. )
  13. // MockStreamManager is a mock of StreamManager interface
  14. type MockStreamManager struct {
  15. ctrl *gomock.Controller
  16. recorder *MockStreamManagerMockRecorder
  17. }
  18. // MockStreamManagerMockRecorder is the mock recorder for MockStreamManager
  19. type MockStreamManagerMockRecorder struct {
  20. mock *MockStreamManager
  21. }
  22. // NewMockStreamManager creates a new mock instance
  23. func NewMockStreamManager(ctrl *gomock.Controller) *MockStreamManager {
  24. mock := &MockStreamManager{ctrl: ctrl}
  25. mock.recorder = &MockStreamManagerMockRecorder{mock}
  26. return mock
  27. }
  28. // EXPECT returns an object that allows the caller to indicate expected use
  29. func (m *MockStreamManager) EXPECT() *MockStreamManagerMockRecorder {
  30. return m.recorder
  31. }
  32. // AcceptStream mocks base method
  33. func (m *MockStreamManager) 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 *MockStreamManagerMockRecorder) AcceptStream(arg0 interface{}) *gomock.Call {
  42. mr.mock.ctrl.T.Helper()
  43. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AcceptStream", reflect.TypeOf((*MockStreamManager)(nil).AcceptStream), arg0)
  44. }
  45. // AcceptUniStream mocks base method
  46. func (m *MockStreamManager) 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 *MockStreamManagerMockRecorder) AcceptUniStream(arg0 interface{}) *gomock.Call {
  55. mr.mock.ctrl.T.Helper()
  56. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AcceptUniStream", reflect.TypeOf((*MockStreamManager)(nil).AcceptUniStream), arg0)
  57. }
  58. // CloseWithError mocks base method
  59. func (m *MockStreamManager) CloseWithError(arg0 error) {
  60. m.ctrl.T.Helper()
  61. m.ctrl.Call(m, "CloseWithError", arg0)
  62. }
  63. // CloseWithError indicates an expected call of CloseWithError
  64. func (mr *MockStreamManagerMockRecorder) CloseWithError(arg0 interface{}) *gomock.Call {
  65. mr.mock.ctrl.T.Helper()
  66. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloseWithError", reflect.TypeOf((*MockStreamManager)(nil).CloseWithError), arg0)
  67. }
  68. // DeleteStream mocks base method
  69. func (m *MockStreamManager) DeleteStream(arg0 protocol.StreamID) error {
  70. m.ctrl.T.Helper()
  71. ret := m.ctrl.Call(m, "DeleteStream", arg0)
  72. ret0, _ := ret[0].(error)
  73. return ret0
  74. }
  75. // DeleteStream indicates an expected call of DeleteStream
  76. func (mr *MockStreamManagerMockRecorder) DeleteStream(arg0 interface{}) *gomock.Call {
  77. mr.mock.ctrl.T.Helper()
  78. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteStream", reflect.TypeOf((*MockStreamManager)(nil).DeleteStream), arg0)
  79. }
  80. // GetOrOpenReceiveStream mocks base method
  81. func (m *MockStreamManager) GetOrOpenReceiveStream(arg0 protocol.StreamID) (receiveStreamI, error) {
  82. m.ctrl.T.Helper()
  83. ret := m.ctrl.Call(m, "GetOrOpenReceiveStream", arg0)
  84. ret0, _ := ret[0].(receiveStreamI)
  85. ret1, _ := ret[1].(error)
  86. return ret0, ret1
  87. }
  88. // GetOrOpenReceiveStream indicates an expected call of GetOrOpenReceiveStream
  89. func (mr *MockStreamManagerMockRecorder) GetOrOpenReceiveStream(arg0 interface{}) *gomock.Call {
  90. mr.mock.ctrl.T.Helper()
  91. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOrOpenReceiveStream", reflect.TypeOf((*MockStreamManager)(nil).GetOrOpenReceiveStream), arg0)
  92. }
  93. // GetOrOpenSendStream mocks base method
  94. func (m *MockStreamManager) GetOrOpenSendStream(arg0 protocol.StreamID) (sendStreamI, error) {
  95. m.ctrl.T.Helper()
  96. ret := m.ctrl.Call(m, "GetOrOpenSendStream", arg0)
  97. ret0, _ := ret[0].(sendStreamI)
  98. ret1, _ := ret[1].(error)
  99. return ret0, ret1
  100. }
  101. // GetOrOpenSendStream indicates an expected call of GetOrOpenSendStream
  102. func (mr *MockStreamManagerMockRecorder) GetOrOpenSendStream(arg0 interface{}) *gomock.Call {
  103. mr.mock.ctrl.T.Helper()
  104. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOrOpenSendStream", reflect.TypeOf((*MockStreamManager)(nil).GetOrOpenSendStream), arg0)
  105. }
  106. // HandleMaxStreamsFrame mocks base method
  107. func (m *MockStreamManager) HandleMaxStreamsFrame(arg0 *wire.MaxStreamsFrame) error {
  108. m.ctrl.T.Helper()
  109. ret := m.ctrl.Call(m, "HandleMaxStreamsFrame", arg0)
  110. ret0, _ := ret[0].(error)
  111. return ret0
  112. }
  113. // HandleMaxStreamsFrame indicates an expected call of HandleMaxStreamsFrame
  114. func (mr *MockStreamManagerMockRecorder) HandleMaxStreamsFrame(arg0 interface{}) *gomock.Call {
  115. mr.mock.ctrl.T.Helper()
  116. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleMaxStreamsFrame", reflect.TypeOf((*MockStreamManager)(nil).HandleMaxStreamsFrame), arg0)
  117. }
  118. // OpenStream mocks base method
  119. func (m *MockStreamManager) OpenStream() (Stream, error) {
  120. m.ctrl.T.Helper()
  121. ret := m.ctrl.Call(m, "OpenStream")
  122. ret0, _ := ret[0].(Stream)
  123. ret1, _ := ret[1].(error)
  124. return ret0, ret1
  125. }
  126. // OpenStream indicates an expected call of OpenStream
  127. func (mr *MockStreamManagerMockRecorder) OpenStream() *gomock.Call {
  128. mr.mock.ctrl.T.Helper()
  129. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenStream", reflect.TypeOf((*MockStreamManager)(nil).OpenStream))
  130. }
  131. // OpenStreamSync mocks base method
  132. func (m *MockStreamManager) OpenStreamSync(arg0 context.Context) (Stream, error) {
  133. m.ctrl.T.Helper()
  134. ret := m.ctrl.Call(m, "OpenStreamSync", arg0)
  135. ret0, _ := ret[0].(Stream)
  136. ret1, _ := ret[1].(error)
  137. return ret0, ret1
  138. }
  139. // OpenStreamSync indicates an expected call of OpenStreamSync
  140. func (mr *MockStreamManagerMockRecorder) OpenStreamSync(arg0 interface{}) *gomock.Call {
  141. mr.mock.ctrl.T.Helper()
  142. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenStreamSync", reflect.TypeOf((*MockStreamManager)(nil).OpenStreamSync), arg0)
  143. }
  144. // OpenUniStream mocks base method
  145. func (m *MockStreamManager) OpenUniStream() (SendStream, error) {
  146. m.ctrl.T.Helper()
  147. ret := m.ctrl.Call(m, "OpenUniStream")
  148. ret0, _ := ret[0].(SendStream)
  149. ret1, _ := ret[1].(error)
  150. return ret0, ret1
  151. }
  152. // OpenUniStream indicates an expected call of OpenUniStream
  153. func (mr *MockStreamManagerMockRecorder) OpenUniStream() *gomock.Call {
  154. mr.mock.ctrl.T.Helper()
  155. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenUniStream", reflect.TypeOf((*MockStreamManager)(nil).OpenUniStream))
  156. }
  157. // OpenUniStreamSync mocks base method
  158. func (m *MockStreamManager) OpenUniStreamSync(arg0 context.Context) (SendStream, error) {
  159. m.ctrl.T.Helper()
  160. ret := m.ctrl.Call(m, "OpenUniStreamSync", arg0)
  161. ret0, _ := ret[0].(SendStream)
  162. ret1, _ := ret[1].(error)
  163. return ret0, ret1
  164. }
  165. // OpenUniStreamSync indicates an expected call of OpenUniStreamSync
  166. func (mr *MockStreamManagerMockRecorder) OpenUniStreamSync(arg0 interface{}) *gomock.Call {
  167. mr.mock.ctrl.T.Helper()
  168. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenUniStreamSync", reflect.TypeOf((*MockStreamManager)(nil).OpenUniStreamSync), arg0)
  169. }
  170. // UpdateLimits mocks base method
  171. func (m *MockStreamManager) UpdateLimits(arg0 *handshake.TransportParameters) error {
  172. m.ctrl.T.Helper()
  173. ret := m.ctrl.Call(m, "UpdateLimits", arg0)
  174. ret0, _ := ret[0].(error)
  175. return ret0
  176. }
  177. // UpdateLimits indicates an expected call of UpdateLimits
  178. func (mr *MockStreamManagerMockRecorder) UpdateLimits(arg0 interface{}) *gomock.Call {
  179. mr.mock.ctrl.T.Helper()
  180. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateLimits", reflect.TypeOf((*MockStreamManager)(nil).UpdateLimits), arg0)
  181. }