mock_stream_manager_test.go 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  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. ret := m.ctrl.Call(m, "AcceptStream")
  34. ret0, _ := ret[0].(Stream)
  35. ret1, _ := ret[1].(error)
  36. return ret0, ret1
  37. }
  38. // AcceptStream indicates an expected call of AcceptStream
  39. func (mr *MockStreamManagerMockRecorder) AcceptStream() *gomock.Call {
  40. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AcceptStream", reflect.TypeOf((*MockStreamManager)(nil).AcceptStream))
  41. }
  42. // AcceptUniStream mocks base method
  43. func (m *MockStreamManager) AcceptUniStream() (ReceiveStream, error) {
  44. ret := m.ctrl.Call(m, "AcceptUniStream")
  45. ret0, _ := ret[0].(ReceiveStream)
  46. ret1, _ := ret[1].(error)
  47. return ret0, ret1
  48. }
  49. // AcceptUniStream indicates an expected call of AcceptUniStream
  50. func (mr *MockStreamManagerMockRecorder) AcceptUniStream() *gomock.Call {
  51. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AcceptUniStream", reflect.TypeOf((*MockStreamManager)(nil).AcceptUniStream))
  52. }
  53. // CloseWithError mocks base method
  54. func (m *MockStreamManager) CloseWithError(arg0 error) {
  55. m.ctrl.Call(m, "CloseWithError", arg0)
  56. }
  57. // CloseWithError indicates an expected call of CloseWithError
  58. func (mr *MockStreamManagerMockRecorder) CloseWithError(arg0 interface{}) *gomock.Call {
  59. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloseWithError", reflect.TypeOf((*MockStreamManager)(nil).CloseWithError), arg0)
  60. }
  61. // DeleteStream mocks base method
  62. func (m *MockStreamManager) DeleteStream(arg0 protocol.StreamID) error {
  63. ret := m.ctrl.Call(m, "DeleteStream", arg0)
  64. ret0, _ := ret[0].(error)
  65. return ret0
  66. }
  67. // DeleteStream indicates an expected call of DeleteStream
  68. func (mr *MockStreamManagerMockRecorder) DeleteStream(arg0 interface{}) *gomock.Call {
  69. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteStream", reflect.TypeOf((*MockStreamManager)(nil).DeleteStream), arg0)
  70. }
  71. // GetOrOpenReceiveStream mocks base method
  72. func (m *MockStreamManager) GetOrOpenReceiveStream(arg0 protocol.StreamID) (receiveStreamI, error) {
  73. ret := m.ctrl.Call(m, "GetOrOpenReceiveStream", arg0)
  74. ret0, _ := ret[0].(receiveStreamI)
  75. ret1, _ := ret[1].(error)
  76. return ret0, ret1
  77. }
  78. // GetOrOpenReceiveStream indicates an expected call of GetOrOpenReceiveStream
  79. func (mr *MockStreamManagerMockRecorder) GetOrOpenReceiveStream(arg0 interface{}) *gomock.Call {
  80. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOrOpenReceiveStream", reflect.TypeOf((*MockStreamManager)(nil).GetOrOpenReceiveStream), arg0)
  81. }
  82. // GetOrOpenSendStream mocks base method
  83. func (m *MockStreamManager) GetOrOpenSendStream(arg0 protocol.StreamID) (sendStreamI, error) {
  84. ret := m.ctrl.Call(m, "GetOrOpenSendStream", arg0)
  85. ret0, _ := ret[0].(sendStreamI)
  86. ret1, _ := ret[1].(error)
  87. return ret0, ret1
  88. }
  89. // GetOrOpenSendStream indicates an expected call of GetOrOpenSendStream
  90. func (mr *MockStreamManagerMockRecorder) GetOrOpenSendStream(arg0 interface{}) *gomock.Call {
  91. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOrOpenSendStream", reflect.TypeOf((*MockStreamManager)(nil).GetOrOpenSendStream), arg0)
  92. }
  93. // HandleMaxStreamsFrame mocks base method
  94. func (m *MockStreamManager) HandleMaxStreamsFrame(arg0 *wire.MaxStreamsFrame) error {
  95. ret := m.ctrl.Call(m, "HandleMaxStreamsFrame", arg0)
  96. ret0, _ := ret[0].(error)
  97. return ret0
  98. }
  99. // HandleMaxStreamsFrame indicates an expected call of HandleMaxStreamsFrame
  100. func (mr *MockStreamManagerMockRecorder) HandleMaxStreamsFrame(arg0 interface{}) *gomock.Call {
  101. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleMaxStreamsFrame", reflect.TypeOf((*MockStreamManager)(nil).HandleMaxStreamsFrame), arg0)
  102. }
  103. // OpenStream mocks base method
  104. func (m *MockStreamManager) OpenStream() (Stream, error) {
  105. ret := m.ctrl.Call(m, "OpenStream")
  106. ret0, _ := ret[0].(Stream)
  107. ret1, _ := ret[1].(error)
  108. return ret0, ret1
  109. }
  110. // OpenStream indicates an expected call of OpenStream
  111. func (mr *MockStreamManagerMockRecorder) OpenStream() *gomock.Call {
  112. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenStream", reflect.TypeOf((*MockStreamManager)(nil).OpenStream))
  113. }
  114. // OpenStreamSync mocks base method
  115. func (m *MockStreamManager) OpenStreamSync() (Stream, error) {
  116. ret := m.ctrl.Call(m, "OpenStreamSync")
  117. ret0, _ := ret[0].(Stream)
  118. ret1, _ := ret[1].(error)
  119. return ret0, ret1
  120. }
  121. // OpenStreamSync indicates an expected call of OpenStreamSync
  122. func (mr *MockStreamManagerMockRecorder) OpenStreamSync() *gomock.Call {
  123. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenStreamSync", reflect.TypeOf((*MockStreamManager)(nil).OpenStreamSync))
  124. }
  125. // OpenUniStream mocks base method
  126. func (m *MockStreamManager) OpenUniStream() (SendStream, error) {
  127. ret := m.ctrl.Call(m, "OpenUniStream")
  128. ret0, _ := ret[0].(SendStream)
  129. ret1, _ := ret[1].(error)
  130. return ret0, ret1
  131. }
  132. // OpenUniStream indicates an expected call of OpenUniStream
  133. func (mr *MockStreamManagerMockRecorder) OpenUniStream() *gomock.Call {
  134. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenUniStream", reflect.TypeOf((*MockStreamManager)(nil).OpenUniStream))
  135. }
  136. // OpenUniStreamSync mocks base method
  137. func (m *MockStreamManager) OpenUniStreamSync() (SendStream, error) {
  138. ret := m.ctrl.Call(m, "OpenUniStreamSync")
  139. ret0, _ := ret[0].(SendStream)
  140. ret1, _ := ret[1].(error)
  141. return ret0, ret1
  142. }
  143. // OpenUniStreamSync indicates an expected call of OpenUniStreamSync
  144. func (mr *MockStreamManagerMockRecorder) OpenUniStreamSync() *gomock.Call {
  145. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenUniStreamSync", reflect.TypeOf((*MockStreamManager)(nil).OpenUniStreamSync))
  146. }
  147. // UpdateLimits mocks base method
  148. func (m *MockStreamManager) UpdateLimits(arg0 *handshake.TransportParameters) {
  149. m.ctrl.Call(m, "UpdateLimits", arg0)
  150. }
  151. // UpdateLimits indicates an expected call of UpdateLimits
  152. func (mr *MockStreamManagerMockRecorder) UpdateLimits(arg0 interface{}) *gomock.Call {
  153. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateLimits", reflect.TypeOf((*MockStreamManager)(nil).UpdateLimits), arg0)
  154. }