mock_stream_internal_test.go 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. // Code generated by MockGen. DO NOT EDIT.
  2. // Source: github.com/lucas-clemente/quic-go (interfaces: StreamI)
  3. // Package quic is a generated GoMock package.
  4. package quic
  5. import (
  6. context "context"
  7. reflect "reflect"
  8. time "time"
  9. gomock "github.com/golang/mock/gomock"
  10. protocol "github.com/lucas-clemente/quic-go/internal/protocol"
  11. wire "github.com/lucas-clemente/quic-go/internal/wire"
  12. )
  13. // MockStreamI is a mock of StreamI interface
  14. type MockStreamI struct {
  15. ctrl *gomock.Controller
  16. recorder *MockStreamIMockRecorder
  17. }
  18. // MockStreamIMockRecorder is the mock recorder for MockStreamI
  19. type MockStreamIMockRecorder struct {
  20. mock *MockStreamI
  21. }
  22. // NewMockStreamI creates a new mock instance
  23. func NewMockStreamI(ctrl *gomock.Controller) *MockStreamI {
  24. mock := &MockStreamI{ctrl: ctrl}
  25. mock.recorder = &MockStreamIMockRecorder{mock}
  26. return mock
  27. }
  28. // EXPECT returns an object that allows the caller to indicate expected use
  29. func (m *MockStreamI) EXPECT() *MockStreamIMockRecorder {
  30. return m.recorder
  31. }
  32. // CancelRead mocks base method
  33. func (m *MockStreamI) CancelRead(arg0 protocol.ApplicationErrorCode) {
  34. m.ctrl.Call(m, "CancelRead", arg0)
  35. }
  36. // CancelRead indicates an expected call of CancelRead
  37. func (mr *MockStreamIMockRecorder) CancelRead(arg0 interface{}) *gomock.Call {
  38. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelRead", reflect.TypeOf((*MockStreamI)(nil).CancelRead), arg0)
  39. }
  40. // CancelWrite mocks base method
  41. func (m *MockStreamI) CancelWrite(arg0 protocol.ApplicationErrorCode) {
  42. m.ctrl.Call(m, "CancelWrite", arg0)
  43. }
  44. // CancelWrite indicates an expected call of CancelWrite
  45. func (mr *MockStreamIMockRecorder) CancelWrite(arg0 interface{}) *gomock.Call {
  46. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelWrite", reflect.TypeOf((*MockStreamI)(nil).CancelWrite), arg0)
  47. }
  48. // Close mocks base method
  49. func (m *MockStreamI) Close() error {
  50. ret := m.ctrl.Call(m, "Close")
  51. ret0, _ := ret[0].(error)
  52. return ret0
  53. }
  54. // Close indicates an expected call of Close
  55. func (mr *MockStreamIMockRecorder) Close() *gomock.Call {
  56. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockStreamI)(nil).Close))
  57. }
  58. // Context mocks base method
  59. func (m *MockStreamI) Context() context.Context {
  60. ret := m.ctrl.Call(m, "Context")
  61. ret0, _ := ret[0].(context.Context)
  62. return ret0
  63. }
  64. // Context indicates an expected call of Context
  65. func (mr *MockStreamIMockRecorder) Context() *gomock.Call {
  66. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockStreamI)(nil).Context))
  67. }
  68. // Read mocks base method
  69. func (m *MockStreamI) Read(arg0 []byte) (int, error) {
  70. ret := m.ctrl.Call(m, "Read", arg0)
  71. ret0, _ := ret[0].(int)
  72. ret1, _ := ret[1].(error)
  73. return ret0, ret1
  74. }
  75. // Read indicates an expected call of Read
  76. func (mr *MockStreamIMockRecorder) Read(arg0 interface{}) *gomock.Call {
  77. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Read", reflect.TypeOf((*MockStreamI)(nil).Read), arg0)
  78. }
  79. // SetDeadline mocks base method
  80. func (m *MockStreamI) SetDeadline(arg0 time.Time) error {
  81. ret := m.ctrl.Call(m, "SetDeadline", arg0)
  82. ret0, _ := ret[0].(error)
  83. return ret0
  84. }
  85. // SetDeadline indicates an expected call of SetDeadline
  86. func (mr *MockStreamIMockRecorder) SetDeadline(arg0 interface{}) *gomock.Call {
  87. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetDeadline", reflect.TypeOf((*MockStreamI)(nil).SetDeadline), arg0)
  88. }
  89. // SetReadDeadline mocks base method
  90. func (m *MockStreamI) SetReadDeadline(arg0 time.Time) error {
  91. ret := m.ctrl.Call(m, "SetReadDeadline", arg0)
  92. ret0, _ := ret[0].(error)
  93. return ret0
  94. }
  95. // SetReadDeadline indicates an expected call of SetReadDeadline
  96. func (mr *MockStreamIMockRecorder) SetReadDeadline(arg0 interface{}) *gomock.Call {
  97. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetReadDeadline", reflect.TypeOf((*MockStreamI)(nil).SetReadDeadline), arg0)
  98. }
  99. // SetWriteDeadline mocks base method
  100. func (m *MockStreamI) SetWriteDeadline(arg0 time.Time) error {
  101. ret := m.ctrl.Call(m, "SetWriteDeadline", arg0)
  102. ret0, _ := ret[0].(error)
  103. return ret0
  104. }
  105. // SetWriteDeadline indicates an expected call of SetWriteDeadline
  106. func (mr *MockStreamIMockRecorder) SetWriteDeadline(arg0 interface{}) *gomock.Call {
  107. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetWriteDeadline", reflect.TypeOf((*MockStreamI)(nil).SetWriteDeadline), arg0)
  108. }
  109. // StreamID mocks base method
  110. func (m *MockStreamI) StreamID() protocol.StreamID {
  111. ret := m.ctrl.Call(m, "StreamID")
  112. ret0, _ := ret[0].(protocol.StreamID)
  113. return ret0
  114. }
  115. // StreamID indicates an expected call of StreamID
  116. func (mr *MockStreamIMockRecorder) StreamID() *gomock.Call {
  117. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StreamID", reflect.TypeOf((*MockStreamI)(nil).StreamID))
  118. }
  119. // Write mocks base method
  120. func (m *MockStreamI) Write(arg0 []byte) (int, error) {
  121. ret := m.ctrl.Call(m, "Write", arg0)
  122. ret0, _ := ret[0].(int)
  123. ret1, _ := ret[1].(error)
  124. return ret0, ret1
  125. }
  126. // Write indicates an expected call of Write
  127. func (mr *MockStreamIMockRecorder) Write(arg0 interface{}) *gomock.Call {
  128. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockStreamI)(nil).Write), arg0)
  129. }
  130. // closeForShutdown mocks base method
  131. func (m *MockStreamI) closeForShutdown(arg0 error) {
  132. m.ctrl.Call(m, "closeForShutdown", arg0)
  133. }
  134. // closeForShutdown indicates an expected call of closeForShutdown
  135. func (mr *MockStreamIMockRecorder) closeForShutdown(arg0 interface{}) *gomock.Call {
  136. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "closeForShutdown", reflect.TypeOf((*MockStreamI)(nil).closeForShutdown), arg0)
  137. }
  138. // getWindowUpdate mocks base method
  139. func (m *MockStreamI) getWindowUpdate() protocol.ByteCount {
  140. ret := m.ctrl.Call(m, "getWindowUpdate")
  141. ret0, _ := ret[0].(protocol.ByteCount)
  142. return ret0
  143. }
  144. // getWindowUpdate indicates an expected call of getWindowUpdate
  145. func (mr *MockStreamIMockRecorder) getWindowUpdate() *gomock.Call {
  146. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "getWindowUpdate", reflect.TypeOf((*MockStreamI)(nil).getWindowUpdate))
  147. }
  148. // handleMaxStreamDataFrame mocks base method
  149. func (m *MockStreamI) handleMaxStreamDataFrame(arg0 *wire.MaxStreamDataFrame) {
  150. m.ctrl.Call(m, "handleMaxStreamDataFrame", arg0)
  151. }
  152. // handleMaxStreamDataFrame indicates an expected call of handleMaxStreamDataFrame
  153. func (mr *MockStreamIMockRecorder) handleMaxStreamDataFrame(arg0 interface{}) *gomock.Call {
  154. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "handleMaxStreamDataFrame", reflect.TypeOf((*MockStreamI)(nil).handleMaxStreamDataFrame), arg0)
  155. }
  156. // handleResetStreamFrame mocks base method
  157. func (m *MockStreamI) handleResetStreamFrame(arg0 *wire.ResetStreamFrame) error {
  158. ret := m.ctrl.Call(m, "handleResetStreamFrame", arg0)
  159. ret0, _ := ret[0].(error)
  160. return ret0
  161. }
  162. // handleResetStreamFrame indicates an expected call of handleResetStreamFrame
  163. func (mr *MockStreamIMockRecorder) handleResetStreamFrame(arg0 interface{}) *gomock.Call {
  164. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "handleResetStreamFrame", reflect.TypeOf((*MockStreamI)(nil).handleResetStreamFrame), arg0)
  165. }
  166. // handleStopSendingFrame mocks base method
  167. func (m *MockStreamI) handleStopSendingFrame(arg0 *wire.StopSendingFrame) {
  168. m.ctrl.Call(m, "handleStopSendingFrame", arg0)
  169. }
  170. // handleStopSendingFrame indicates an expected call of handleStopSendingFrame
  171. func (mr *MockStreamIMockRecorder) handleStopSendingFrame(arg0 interface{}) *gomock.Call {
  172. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "handleStopSendingFrame", reflect.TypeOf((*MockStreamI)(nil).handleStopSendingFrame), arg0)
  173. }
  174. // handleStreamFrame mocks base method
  175. func (m *MockStreamI) handleStreamFrame(arg0 *wire.StreamFrame) error {
  176. ret := m.ctrl.Call(m, "handleStreamFrame", arg0)
  177. ret0, _ := ret[0].(error)
  178. return ret0
  179. }
  180. // handleStreamFrame indicates an expected call of handleStreamFrame
  181. func (mr *MockStreamIMockRecorder) handleStreamFrame(arg0 interface{}) *gomock.Call {
  182. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "handleStreamFrame", reflect.TypeOf((*MockStreamI)(nil).handleStreamFrame), arg0)
  183. }
  184. // hasData mocks base method
  185. func (m *MockStreamI) hasData() bool {
  186. ret := m.ctrl.Call(m, "hasData")
  187. ret0, _ := ret[0].(bool)
  188. return ret0
  189. }
  190. // hasData indicates an expected call of hasData
  191. func (mr *MockStreamIMockRecorder) hasData() *gomock.Call {
  192. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "hasData", reflect.TypeOf((*MockStreamI)(nil).hasData))
  193. }
  194. // popStreamFrame mocks base method
  195. func (m *MockStreamI) popStreamFrame(arg0 protocol.ByteCount) (*wire.StreamFrame, bool) {
  196. ret := m.ctrl.Call(m, "popStreamFrame", arg0)
  197. ret0, _ := ret[0].(*wire.StreamFrame)
  198. ret1, _ := ret[1].(bool)
  199. return ret0, ret1
  200. }
  201. // popStreamFrame indicates an expected call of popStreamFrame
  202. func (mr *MockStreamIMockRecorder) popStreamFrame(arg0 interface{}) *gomock.Call {
  203. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "popStreamFrame", reflect.TypeOf((*MockStreamI)(nil).popStreamFrame), arg0)
  204. }