mock_crypto_stream_test.go 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. // Code generated by MockGen. DO NOT EDIT.
  2. // Source: github.com/lucas-clemente/quic-go (interfaces: CryptoStream)
  3. // Package quic is a generated GoMock package.
  4. package quic
  5. import (
  6. reflect "reflect"
  7. gomock "github.com/golang/mock/gomock"
  8. protocol "github.com/lucas-clemente/quic-go/internal/protocol"
  9. wire "github.com/lucas-clemente/quic-go/internal/wire"
  10. )
  11. // MockCryptoStream is a mock of CryptoStream interface
  12. type MockCryptoStream struct {
  13. ctrl *gomock.Controller
  14. recorder *MockCryptoStreamMockRecorder
  15. }
  16. // MockCryptoStreamMockRecorder is the mock recorder for MockCryptoStream
  17. type MockCryptoStreamMockRecorder struct {
  18. mock *MockCryptoStream
  19. }
  20. // NewMockCryptoStream creates a new mock instance
  21. func NewMockCryptoStream(ctrl *gomock.Controller) *MockCryptoStream {
  22. mock := &MockCryptoStream{ctrl: ctrl}
  23. mock.recorder = &MockCryptoStreamMockRecorder{mock}
  24. return mock
  25. }
  26. // EXPECT returns an object that allows the caller to indicate expected use
  27. func (m *MockCryptoStream) EXPECT() *MockCryptoStreamMockRecorder {
  28. return m.recorder
  29. }
  30. // Finish mocks base method
  31. func (m *MockCryptoStream) Finish() error {
  32. m.ctrl.T.Helper()
  33. ret := m.ctrl.Call(m, "Finish")
  34. ret0, _ := ret[0].(error)
  35. return ret0
  36. }
  37. // Finish indicates an expected call of Finish
  38. func (mr *MockCryptoStreamMockRecorder) Finish() *gomock.Call {
  39. mr.mock.ctrl.T.Helper()
  40. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Finish", reflect.TypeOf((*MockCryptoStream)(nil).Finish))
  41. }
  42. // GetCryptoData mocks base method
  43. func (m *MockCryptoStream) GetCryptoData() []byte {
  44. m.ctrl.T.Helper()
  45. ret := m.ctrl.Call(m, "GetCryptoData")
  46. ret0, _ := ret[0].([]byte)
  47. return ret0
  48. }
  49. // GetCryptoData indicates an expected call of GetCryptoData
  50. func (mr *MockCryptoStreamMockRecorder) GetCryptoData() *gomock.Call {
  51. mr.mock.ctrl.T.Helper()
  52. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCryptoData", reflect.TypeOf((*MockCryptoStream)(nil).GetCryptoData))
  53. }
  54. // HandleCryptoFrame mocks base method
  55. func (m *MockCryptoStream) HandleCryptoFrame(arg0 *wire.CryptoFrame) error {
  56. m.ctrl.T.Helper()
  57. ret := m.ctrl.Call(m, "HandleCryptoFrame", arg0)
  58. ret0, _ := ret[0].(error)
  59. return ret0
  60. }
  61. // HandleCryptoFrame indicates an expected call of HandleCryptoFrame
  62. func (mr *MockCryptoStreamMockRecorder) HandleCryptoFrame(arg0 interface{}) *gomock.Call {
  63. mr.mock.ctrl.T.Helper()
  64. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleCryptoFrame", reflect.TypeOf((*MockCryptoStream)(nil).HandleCryptoFrame), arg0)
  65. }
  66. // HasData mocks base method
  67. func (m *MockCryptoStream) HasData() bool {
  68. m.ctrl.T.Helper()
  69. ret := m.ctrl.Call(m, "HasData")
  70. ret0, _ := ret[0].(bool)
  71. return ret0
  72. }
  73. // HasData indicates an expected call of HasData
  74. func (mr *MockCryptoStreamMockRecorder) HasData() *gomock.Call {
  75. mr.mock.ctrl.T.Helper()
  76. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasData", reflect.TypeOf((*MockCryptoStream)(nil).HasData))
  77. }
  78. // PopCryptoFrame mocks base method
  79. func (m *MockCryptoStream) PopCryptoFrame(arg0 protocol.ByteCount) *wire.CryptoFrame {
  80. m.ctrl.T.Helper()
  81. ret := m.ctrl.Call(m, "PopCryptoFrame", arg0)
  82. ret0, _ := ret[0].(*wire.CryptoFrame)
  83. return ret0
  84. }
  85. // PopCryptoFrame indicates an expected call of PopCryptoFrame
  86. func (mr *MockCryptoStreamMockRecorder) PopCryptoFrame(arg0 interface{}) *gomock.Call {
  87. mr.mock.ctrl.T.Helper()
  88. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PopCryptoFrame", reflect.TypeOf((*MockCryptoStream)(nil).PopCryptoFrame), arg0)
  89. }
  90. // Write mocks base method
  91. func (m *MockCryptoStream) Write(arg0 []byte) (int, error) {
  92. m.ctrl.T.Helper()
  93. ret := m.ctrl.Call(m, "Write", arg0)
  94. ret0, _ := ret[0].(int)
  95. ret1, _ := ret[1].(error)
  96. return ret0, ret1
  97. }
  98. // Write indicates an expected call of Write
  99. func (mr *MockCryptoStreamMockRecorder) Write(arg0 interface{}) *gomock.Call {
  100. mr.mock.ctrl.T.Helper()
  101. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockCryptoStream)(nil).Write), arg0)
  102. }