mock_crypto_stream_test.go 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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. ret := m.ctrl.Call(m, "Finish")
  33. ret0, _ := ret[0].(error)
  34. return ret0
  35. }
  36. // Finish indicates an expected call of Finish
  37. func (mr *MockCryptoStreamMockRecorder) Finish() *gomock.Call {
  38. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Finish", reflect.TypeOf((*MockCryptoStream)(nil).Finish))
  39. }
  40. // GetCryptoData mocks base method
  41. func (m *MockCryptoStream) GetCryptoData() []byte {
  42. ret := m.ctrl.Call(m, "GetCryptoData")
  43. ret0, _ := ret[0].([]byte)
  44. return ret0
  45. }
  46. // GetCryptoData indicates an expected call of GetCryptoData
  47. func (mr *MockCryptoStreamMockRecorder) GetCryptoData() *gomock.Call {
  48. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCryptoData", reflect.TypeOf((*MockCryptoStream)(nil).GetCryptoData))
  49. }
  50. // HandleCryptoFrame mocks base method
  51. func (m *MockCryptoStream) HandleCryptoFrame(arg0 *wire.CryptoFrame) error {
  52. ret := m.ctrl.Call(m, "HandleCryptoFrame", arg0)
  53. ret0, _ := ret[0].(error)
  54. return ret0
  55. }
  56. // HandleCryptoFrame indicates an expected call of HandleCryptoFrame
  57. func (mr *MockCryptoStreamMockRecorder) HandleCryptoFrame(arg0 interface{}) *gomock.Call {
  58. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleCryptoFrame", reflect.TypeOf((*MockCryptoStream)(nil).HandleCryptoFrame), arg0)
  59. }
  60. // HasData mocks base method
  61. func (m *MockCryptoStream) HasData() bool {
  62. ret := m.ctrl.Call(m, "HasData")
  63. ret0, _ := ret[0].(bool)
  64. return ret0
  65. }
  66. // HasData indicates an expected call of HasData
  67. func (mr *MockCryptoStreamMockRecorder) HasData() *gomock.Call {
  68. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasData", reflect.TypeOf((*MockCryptoStream)(nil).HasData))
  69. }
  70. // PopCryptoFrame mocks base method
  71. func (m *MockCryptoStream) PopCryptoFrame(arg0 protocol.ByteCount) *wire.CryptoFrame {
  72. ret := m.ctrl.Call(m, "PopCryptoFrame", arg0)
  73. ret0, _ := ret[0].(*wire.CryptoFrame)
  74. return ret0
  75. }
  76. // PopCryptoFrame indicates an expected call of PopCryptoFrame
  77. func (mr *MockCryptoStreamMockRecorder) PopCryptoFrame(arg0 interface{}) *gomock.Call {
  78. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PopCryptoFrame", reflect.TypeOf((*MockCryptoStream)(nil).PopCryptoFrame), arg0)
  79. }
  80. // Write mocks base method
  81. func (m *MockCryptoStream) Write(arg0 []byte) (int, error) {
  82. ret := m.ctrl.Call(m, "Write", arg0)
  83. ret0, _ := ret[0].(int)
  84. ret1, _ := ret[1].(error)
  85. return ret0, ret1
  86. }
  87. // Write indicates an expected call of Write
  88. func (mr *MockCryptoStreamMockRecorder) Write(arg0 interface{}) *gomock.Call {
  89. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockCryptoStream)(nil).Write), arg0)
  90. }