mock_stream_manager_test.go 7.6 KB

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