github.com/TugasAkhir-QUIC/quic-go@v0.0.2-0.20240215011318-d20e25a9054c/mock_frame_source_test.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: github.com/TugasAkhir-QUIC/quic-go (interfaces: FrameSource) 3 // 4 // Generated by this command: 5 // 6 // mockgen.exe -typed -build_flags=-tags=gomock -package quic -self_package github.com/TugasAkhir-QUIC/quic-go -destination mock_frame_source_test.go github.com/TugasAkhir-QUIC/quic-go FrameSource 7 // 8 // Package quic is a generated GoMock package. 9 package quic 10 11 import ( 12 reflect "reflect" 13 14 ackhandler "github.com/TugasAkhir-QUIC/quic-go/internal/ackhandler" 15 protocol "github.com/TugasAkhir-QUIC/quic-go/internal/protocol" 16 gomock "go.uber.org/mock/gomock" 17 ) 18 19 // MockFrameSource is a mock of FrameSource interface. 20 type MockFrameSource struct { 21 ctrl *gomock.Controller 22 recorder *MockFrameSourceMockRecorder 23 } 24 25 // MockFrameSourceMockRecorder is the mock recorder for MockFrameSource. 26 type MockFrameSourceMockRecorder struct { 27 mock *MockFrameSource 28 } 29 30 // NewMockFrameSource creates a new mock instance. 31 func NewMockFrameSource(ctrl *gomock.Controller) *MockFrameSource { 32 mock := &MockFrameSource{ctrl: ctrl} 33 mock.recorder = &MockFrameSourceMockRecorder{mock} 34 return mock 35 } 36 37 // EXPECT returns an object that allows the caller to indicate expected use. 38 func (m *MockFrameSource) EXPECT() *MockFrameSourceMockRecorder { 39 return m.recorder 40 } 41 42 // AppendControlFrames mocks base method. 43 func (m *MockFrameSource) AppendControlFrames(arg0 []ackhandler.Frame, arg1 protocol.ByteCount, arg2 protocol.Version) ([]ackhandler.Frame, protocol.ByteCount) { 44 m.ctrl.T.Helper() 45 ret := m.ctrl.Call(m, "AppendControlFrames", arg0, arg1, arg2) 46 ret0, _ := ret[0].([]ackhandler.Frame) 47 ret1, _ := ret[1].(protocol.ByteCount) 48 return ret0, ret1 49 } 50 51 // AppendControlFrames indicates an expected call of AppendControlFrames. 52 func (mr *MockFrameSourceMockRecorder) AppendControlFrames(arg0, arg1, arg2 any) *FrameSourceAppendControlFramesCall { 53 mr.mock.ctrl.T.Helper() 54 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AppendControlFrames", reflect.TypeOf((*MockFrameSource)(nil).AppendControlFrames), arg0, arg1, arg2) 55 return &FrameSourceAppendControlFramesCall{Call: call} 56 } 57 58 // FrameSourceAppendControlFramesCall wrap *gomock.Call 59 type FrameSourceAppendControlFramesCall struct { 60 *gomock.Call 61 } 62 63 // Return rewrite *gomock.Call.Return 64 func (c *FrameSourceAppendControlFramesCall) Return(arg0 []ackhandler.Frame, arg1 protocol.ByteCount) *FrameSourceAppendControlFramesCall { 65 c.Call = c.Call.Return(arg0, arg1) 66 return c 67 } 68 69 // Do rewrite *gomock.Call.Do 70 func (c *FrameSourceAppendControlFramesCall) Do(f func([]ackhandler.Frame, protocol.ByteCount, protocol.Version) ([]ackhandler.Frame, protocol.ByteCount)) *FrameSourceAppendControlFramesCall { 71 c.Call = c.Call.Do(f) 72 return c 73 } 74 75 // DoAndReturn rewrite *gomock.Call.DoAndReturn 76 func (c *FrameSourceAppendControlFramesCall) DoAndReturn(f func([]ackhandler.Frame, protocol.ByteCount, protocol.Version) ([]ackhandler.Frame, protocol.ByteCount)) *FrameSourceAppendControlFramesCall { 77 c.Call = c.Call.DoAndReturn(f) 78 return c 79 } 80 81 // AppendStreamFrames mocks base method. 82 func (m *MockFrameSource) AppendStreamFrames(arg0 []ackhandler.StreamFrame, arg1 protocol.ByteCount, arg2 protocol.Version) ([]ackhandler.StreamFrame, protocol.ByteCount) { 83 m.ctrl.T.Helper() 84 ret := m.ctrl.Call(m, "AppendStreamFrames", arg0, arg1, arg2) 85 ret0, _ := ret[0].([]ackhandler.StreamFrame) 86 ret1, _ := ret[1].(protocol.ByteCount) 87 return ret0, ret1 88 } 89 90 // AppendStreamFrames indicates an expected call of AppendStreamFrames. 91 func (mr *MockFrameSourceMockRecorder) AppendStreamFrames(arg0, arg1, arg2 any) *FrameSourceAppendStreamFramesCall { 92 mr.mock.ctrl.T.Helper() 93 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AppendStreamFrames", reflect.TypeOf((*MockFrameSource)(nil).AppendStreamFrames), arg0, arg1, arg2) 94 return &FrameSourceAppendStreamFramesCall{Call: call} 95 } 96 97 // FrameSourceAppendStreamFramesCall wrap *gomock.Call 98 type FrameSourceAppendStreamFramesCall struct { 99 *gomock.Call 100 } 101 102 // Return rewrite *gomock.Call.Return 103 func (c *FrameSourceAppendStreamFramesCall) Return(arg0 []ackhandler.StreamFrame, arg1 protocol.ByteCount) *FrameSourceAppendStreamFramesCall { 104 c.Call = c.Call.Return(arg0, arg1) 105 return c 106 } 107 108 // Do rewrite *gomock.Call.Do 109 func (c *FrameSourceAppendStreamFramesCall) Do(f func([]ackhandler.StreamFrame, protocol.ByteCount, protocol.Version) ([]ackhandler.StreamFrame, protocol.ByteCount)) *FrameSourceAppendStreamFramesCall { 110 c.Call = c.Call.Do(f) 111 return c 112 } 113 114 // DoAndReturn rewrite *gomock.Call.DoAndReturn 115 func (c *FrameSourceAppendStreamFramesCall) DoAndReturn(f func([]ackhandler.StreamFrame, protocol.ByteCount, protocol.Version) ([]ackhandler.StreamFrame, protocol.ByteCount)) *FrameSourceAppendStreamFramesCall { 116 c.Call = c.Call.DoAndReturn(f) 117 return c 118 } 119 120 // HasData mocks base method. 121 func (m *MockFrameSource) HasData() bool { 122 m.ctrl.T.Helper() 123 ret := m.ctrl.Call(m, "HasData") 124 ret0, _ := ret[0].(bool) 125 return ret0 126 } 127 128 // HasData indicates an expected call of HasData. 129 func (mr *MockFrameSourceMockRecorder) HasData() *FrameSourceHasDataCall { 130 mr.mock.ctrl.T.Helper() 131 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasData", reflect.TypeOf((*MockFrameSource)(nil).HasData)) 132 return &FrameSourceHasDataCall{Call: call} 133 } 134 135 // FrameSourceHasDataCall wrap *gomock.Call 136 type FrameSourceHasDataCall struct { 137 *gomock.Call 138 } 139 140 // Return rewrite *gomock.Call.Return 141 func (c *FrameSourceHasDataCall) Return(arg0 bool) *FrameSourceHasDataCall { 142 c.Call = c.Call.Return(arg0) 143 return c 144 } 145 146 // Do rewrite *gomock.Call.Do 147 func (c *FrameSourceHasDataCall) Do(f func() bool) *FrameSourceHasDataCall { 148 c.Call = c.Call.Do(f) 149 return c 150 } 151 152 // DoAndReturn rewrite *gomock.Call.DoAndReturn 153 func (c *FrameSourceHasDataCall) DoAndReturn(f func() bool) *FrameSourceHasDataCall { 154 c.Call = c.Call.DoAndReturn(f) 155 return c 156 }