mock_stream_internal_test.go 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  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.T.Helper()
  35. m.ctrl.Call(m, "CancelRead", arg0)
  36. }
  37. // CancelRead indicates an expected call of CancelRead
  38. func (mr *MockStreamIMockRecorder) CancelRead(arg0 interface{}) *gomock.Call {
  39. mr.mock.ctrl.T.Helper()
  40. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelRead", reflect.TypeOf((*MockStreamI)(nil).CancelRead), arg0)
  41. }
  42. // CancelWrite mocks base method
  43. func (m *MockStreamI) CancelWrite(arg0 protocol.ApplicationErrorCode) {
  44. m.ctrl.T.Helper()
  45. m.ctrl.Call(m, "CancelWrite", arg0)
  46. }
  47. // CancelWrite indicates an expected call of CancelWrite
  48. func (mr *MockStreamIMockRecorder) CancelWrite(arg0 interface{}) *gomock.Call {
  49. mr.mock.ctrl.T.Helper()
  50. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelWrite", reflect.TypeOf((*MockStreamI)(nil).CancelWrite), arg0)
  51. }
  52. // Close mocks base method
  53. func (m *MockStreamI) Close() error {
  54. m.ctrl.T.Helper()
  55. ret := m.ctrl.Call(m, "Close")
  56. ret0, _ := ret[0].(error)
  57. return ret0
  58. }
  59. // Close indicates an expected call of Close
  60. func (mr *MockStreamIMockRecorder) Close() *gomock.Call {
  61. mr.mock.ctrl.T.Helper()
  62. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockStreamI)(nil).Close))
  63. }
  64. // Context mocks base method
  65. func (m *MockStreamI) Context() context.Context {
  66. m.ctrl.T.Helper()
  67. ret := m.ctrl.Call(m, "Context")
  68. ret0, _ := ret[0].(context.Context)
  69. return ret0
  70. }
  71. // Context indicates an expected call of Context
  72. func (mr *MockStreamIMockRecorder) Context() *gomock.Call {
  73. mr.mock.ctrl.T.Helper()
  74. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockStreamI)(nil).Context))
  75. }
  76. // Read mocks base method
  77. func (m *MockStreamI) Read(arg0 []byte) (int, error) {
  78. m.ctrl.T.Helper()
  79. ret := m.ctrl.Call(m, "Read", arg0)
  80. ret0, _ := ret[0].(int)
  81. ret1, _ := ret[1].(error)
  82. return ret0, ret1
  83. }
  84. // Read indicates an expected call of Read
  85. func (mr *MockStreamIMockRecorder) Read(arg0 interface{}) *gomock.Call {
  86. mr.mock.ctrl.T.Helper()
  87. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Read", reflect.TypeOf((*MockStreamI)(nil).Read), arg0)
  88. }
  89. // SetDeadline mocks base method
  90. func (m *MockStreamI) SetDeadline(arg0 time.Time) error {
  91. m.ctrl.T.Helper()
  92. ret := m.ctrl.Call(m, "SetDeadline", arg0)
  93. ret0, _ := ret[0].(error)
  94. return ret0
  95. }
  96. // SetDeadline indicates an expected call of SetDeadline
  97. func (mr *MockStreamIMockRecorder) SetDeadline(arg0 interface{}) *gomock.Call {
  98. mr.mock.ctrl.T.Helper()
  99. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetDeadline", reflect.TypeOf((*MockStreamI)(nil).SetDeadline), arg0)
  100. }
  101. // SetReadDeadline mocks base method
  102. func (m *MockStreamI) SetReadDeadline(arg0 time.Time) error {
  103. m.ctrl.T.Helper()
  104. ret := m.ctrl.Call(m, "SetReadDeadline", arg0)
  105. ret0, _ := ret[0].(error)
  106. return ret0
  107. }
  108. // SetReadDeadline indicates an expected call of SetReadDeadline
  109. func (mr *MockStreamIMockRecorder) SetReadDeadline(arg0 interface{}) *gomock.Call {
  110. mr.mock.ctrl.T.Helper()
  111. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetReadDeadline", reflect.TypeOf((*MockStreamI)(nil).SetReadDeadline), arg0)
  112. }
  113. // SetWriteDeadline mocks base method
  114. func (m *MockStreamI) SetWriteDeadline(arg0 time.Time) error {
  115. m.ctrl.T.Helper()
  116. ret := m.ctrl.Call(m, "SetWriteDeadline", arg0)
  117. ret0, _ := ret[0].(error)
  118. return ret0
  119. }
  120. // SetWriteDeadline indicates an expected call of SetWriteDeadline
  121. func (mr *MockStreamIMockRecorder) SetWriteDeadline(arg0 interface{}) *gomock.Call {
  122. mr.mock.ctrl.T.Helper()
  123. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetWriteDeadline", reflect.TypeOf((*MockStreamI)(nil).SetWriteDeadline), arg0)
  124. }
  125. // StreamID mocks base method
  126. func (m *MockStreamI) StreamID() protocol.StreamID {
  127. m.ctrl.T.Helper()
  128. ret := m.ctrl.Call(m, "StreamID")
  129. ret0, _ := ret[0].(protocol.StreamID)
  130. return ret0
  131. }
  132. // StreamID indicates an expected call of StreamID
  133. func (mr *MockStreamIMockRecorder) StreamID() *gomock.Call {
  134. mr.mock.ctrl.T.Helper()
  135. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StreamID", reflect.TypeOf((*MockStreamI)(nil).StreamID))
  136. }
  137. // Write mocks base method
  138. func (m *MockStreamI) Write(arg0 []byte) (int, error) {
  139. m.ctrl.T.Helper()
  140. ret := m.ctrl.Call(m, "Write", arg0)
  141. ret0, _ := ret[0].(int)
  142. ret1, _ := ret[1].(error)
  143. return ret0, ret1
  144. }
  145. // Write indicates an expected call of Write
  146. func (mr *MockStreamIMockRecorder) Write(arg0 interface{}) *gomock.Call {
  147. mr.mock.ctrl.T.Helper()
  148. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockStreamI)(nil).Write), arg0)
  149. }
  150. // closeForShutdown mocks base method
  151. func (m *MockStreamI) closeForShutdown(arg0 error) {
  152. m.ctrl.T.Helper()
  153. m.ctrl.Call(m, "closeForShutdown", arg0)
  154. }
  155. // closeForShutdown indicates an expected call of closeForShutdown
  156. func (mr *MockStreamIMockRecorder) closeForShutdown(arg0 interface{}) *gomock.Call {
  157. mr.mock.ctrl.T.Helper()
  158. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "closeForShutdown", reflect.TypeOf((*MockStreamI)(nil).closeForShutdown), arg0)
  159. }
  160. // getWindowUpdate mocks base method
  161. func (m *MockStreamI) getWindowUpdate() protocol.ByteCount {
  162. m.ctrl.T.Helper()
  163. ret := m.ctrl.Call(m, "getWindowUpdate")
  164. ret0, _ := ret[0].(protocol.ByteCount)
  165. return ret0
  166. }
  167. // getWindowUpdate indicates an expected call of getWindowUpdate
  168. func (mr *MockStreamIMockRecorder) getWindowUpdate() *gomock.Call {
  169. mr.mock.ctrl.T.Helper()
  170. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "getWindowUpdate", reflect.TypeOf((*MockStreamI)(nil).getWindowUpdate))
  171. }
  172. // handleMaxStreamDataFrame mocks base method
  173. func (m *MockStreamI) handleMaxStreamDataFrame(arg0 *wire.MaxStreamDataFrame) {
  174. m.ctrl.T.Helper()
  175. m.ctrl.Call(m, "handleMaxStreamDataFrame", arg0)
  176. }
  177. // handleMaxStreamDataFrame indicates an expected call of handleMaxStreamDataFrame
  178. func (mr *MockStreamIMockRecorder) handleMaxStreamDataFrame(arg0 interface{}) *gomock.Call {
  179. mr.mock.ctrl.T.Helper()
  180. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "handleMaxStreamDataFrame", reflect.TypeOf((*MockStreamI)(nil).handleMaxStreamDataFrame), arg0)
  181. }
  182. // handleResetStreamFrame mocks base method
  183. func (m *MockStreamI) handleResetStreamFrame(arg0 *wire.ResetStreamFrame) error {
  184. m.ctrl.T.Helper()
  185. ret := m.ctrl.Call(m, "handleResetStreamFrame", arg0)
  186. ret0, _ := ret[0].(error)
  187. return ret0
  188. }
  189. // handleResetStreamFrame indicates an expected call of handleResetStreamFrame
  190. func (mr *MockStreamIMockRecorder) handleResetStreamFrame(arg0 interface{}) *gomock.Call {
  191. mr.mock.ctrl.T.Helper()
  192. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "handleResetStreamFrame", reflect.TypeOf((*MockStreamI)(nil).handleResetStreamFrame), arg0)
  193. }
  194. // handleStopSendingFrame mocks base method
  195. func (m *MockStreamI) handleStopSendingFrame(arg0 *wire.StopSendingFrame) {
  196. m.ctrl.T.Helper()
  197. m.ctrl.Call(m, "handleStopSendingFrame", arg0)
  198. }
  199. // handleStopSendingFrame indicates an expected call of handleStopSendingFrame
  200. func (mr *MockStreamIMockRecorder) handleStopSendingFrame(arg0 interface{}) *gomock.Call {
  201. mr.mock.ctrl.T.Helper()
  202. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "handleStopSendingFrame", reflect.TypeOf((*MockStreamI)(nil).handleStopSendingFrame), arg0)
  203. }
  204. // handleStreamFrame mocks base method
  205. func (m *MockStreamI) handleStreamFrame(arg0 *wire.StreamFrame) error {
  206. m.ctrl.T.Helper()
  207. ret := m.ctrl.Call(m, "handleStreamFrame", arg0)
  208. ret0, _ := ret[0].(error)
  209. return ret0
  210. }
  211. // handleStreamFrame indicates an expected call of handleStreamFrame
  212. func (mr *MockStreamIMockRecorder) handleStreamFrame(arg0 interface{}) *gomock.Call {
  213. mr.mock.ctrl.T.Helper()
  214. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "handleStreamFrame", reflect.TypeOf((*MockStreamI)(nil).handleStreamFrame), arg0)
  215. }
  216. // hasData mocks base method
  217. func (m *MockStreamI) hasData() bool {
  218. m.ctrl.T.Helper()
  219. ret := m.ctrl.Call(m, "hasData")
  220. ret0, _ := ret[0].(bool)
  221. return ret0
  222. }
  223. // hasData indicates an expected call of hasData
  224. func (mr *MockStreamIMockRecorder) hasData() *gomock.Call {
  225. mr.mock.ctrl.T.Helper()
  226. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "hasData", reflect.TypeOf((*MockStreamI)(nil).hasData))
  227. }
  228. // popStreamFrame mocks base method
  229. func (m *MockStreamI) popStreamFrame(arg0 protocol.ByteCount) (*wire.StreamFrame, bool) {
  230. m.ctrl.T.Helper()
  231. ret := m.ctrl.Call(m, "popStreamFrame", arg0)
  232. ret0, _ := ret[0].(*wire.StreamFrame)
  233. ret1, _ := ret[1].(bool)
  234. return ret0, ret1
  235. }
  236. // popStreamFrame indicates an expected call of popStreamFrame
  237. func (mr *MockStreamIMockRecorder) popStreamFrame(arg0 interface{}) *gomock.Call {
  238. mr.mock.ctrl.T.Helper()
  239. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "popStreamFrame", reflect.TypeOf((*MockStreamI)(nil).popStreamFrame), arg0)
  240. }