github.com/TugasAkhir-QUIC/quic-go@v0.0.2-0.20240215011318-d20e25a9054c/mock_sender_test.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: github.com/TugasAkhir-QUIC/quic-go (interfaces: Sender) 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_sender_test.go github.com/TugasAkhir-QUIC/quic-go Sender 7 // 8 // Package quic is a generated GoMock package. 9 package quic 10 11 import ( 12 reflect "reflect" 13 14 protocol "github.com/TugasAkhir-QUIC/quic-go/internal/protocol" 15 gomock "go.uber.org/mock/gomock" 16 ) 17 18 // MockSender is a mock of Sender interface. 19 type MockSender struct { 20 ctrl *gomock.Controller 21 recorder *MockSenderMockRecorder 22 } 23 24 // MockSenderMockRecorder is the mock recorder for MockSender. 25 type MockSenderMockRecorder struct { 26 mock *MockSender 27 } 28 29 // NewMockSender creates a new mock instance. 30 func NewMockSender(ctrl *gomock.Controller) *MockSender { 31 mock := &MockSender{ctrl: ctrl} 32 mock.recorder = &MockSenderMockRecorder{mock} 33 return mock 34 } 35 36 // EXPECT returns an object that allows the caller to indicate expected use. 37 func (m *MockSender) EXPECT() *MockSenderMockRecorder { 38 return m.recorder 39 } 40 41 // Available mocks base method. 42 func (m *MockSender) Available() <-chan struct{} { 43 m.ctrl.T.Helper() 44 ret := m.ctrl.Call(m, "Available") 45 ret0, _ := ret[0].(<-chan struct{}) 46 return ret0 47 } 48 49 // Available indicates an expected call of Available. 50 func (mr *MockSenderMockRecorder) Available() *SenderAvailableCall { 51 mr.mock.ctrl.T.Helper() 52 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Available", reflect.TypeOf((*MockSender)(nil).Available)) 53 return &SenderAvailableCall{Call: call} 54 } 55 56 // SenderAvailableCall wrap *gomock.Call 57 type SenderAvailableCall struct { 58 *gomock.Call 59 } 60 61 // Return rewrite *gomock.Call.Return 62 func (c *SenderAvailableCall) Return(arg0 <-chan struct{}) *SenderAvailableCall { 63 c.Call = c.Call.Return(arg0) 64 return c 65 } 66 67 // Do rewrite *gomock.Call.Do 68 func (c *SenderAvailableCall) Do(f func() <-chan struct{}) *SenderAvailableCall { 69 c.Call = c.Call.Do(f) 70 return c 71 } 72 73 // DoAndReturn rewrite *gomock.Call.DoAndReturn 74 func (c *SenderAvailableCall) DoAndReturn(f func() <-chan struct{}) *SenderAvailableCall { 75 c.Call = c.Call.DoAndReturn(f) 76 return c 77 } 78 79 // Close mocks base method. 80 func (m *MockSender) Close() { 81 m.ctrl.T.Helper() 82 m.ctrl.Call(m, "Close") 83 } 84 85 // Close indicates an expected call of Close. 86 func (mr *MockSenderMockRecorder) Close() *SenderCloseCall { 87 mr.mock.ctrl.T.Helper() 88 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockSender)(nil).Close)) 89 return &SenderCloseCall{Call: call} 90 } 91 92 // SenderCloseCall wrap *gomock.Call 93 type SenderCloseCall struct { 94 *gomock.Call 95 } 96 97 // Return rewrite *gomock.Call.Return 98 func (c *SenderCloseCall) Return() *SenderCloseCall { 99 c.Call = c.Call.Return() 100 return c 101 } 102 103 // Do rewrite *gomock.Call.Do 104 func (c *SenderCloseCall) Do(f func()) *SenderCloseCall { 105 c.Call = c.Call.Do(f) 106 return c 107 } 108 109 // DoAndReturn rewrite *gomock.Call.DoAndReturn 110 func (c *SenderCloseCall) DoAndReturn(f func()) *SenderCloseCall { 111 c.Call = c.Call.DoAndReturn(f) 112 return c 113 } 114 115 // Run mocks base method. 116 func (m *MockSender) Run() error { 117 m.ctrl.T.Helper() 118 ret := m.ctrl.Call(m, "Run") 119 ret0, _ := ret[0].(error) 120 return ret0 121 } 122 123 // Run indicates an expected call of Run. 124 func (mr *MockSenderMockRecorder) Run() *SenderRunCall { 125 mr.mock.ctrl.T.Helper() 126 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockSender)(nil).Run)) 127 return &SenderRunCall{Call: call} 128 } 129 130 // SenderRunCall wrap *gomock.Call 131 type SenderRunCall struct { 132 *gomock.Call 133 } 134 135 // Return rewrite *gomock.Call.Return 136 func (c *SenderRunCall) Return(arg0 error) *SenderRunCall { 137 c.Call = c.Call.Return(arg0) 138 return c 139 } 140 141 // Do rewrite *gomock.Call.Do 142 func (c *SenderRunCall) Do(f func() error) *SenderRunCall { 143 c.Call = c.Call.Do(f) 144 return c 145 } 146 147 // DoAndReturn rewrite *gomock.Call.DoAndReturn 148 func (c *SenderRunCall) DoAndReturn(f func() error) *SenderRunCall { 149 c.Call = c.Call.DoAndReturn(f) 150 return c 151 } 152 153 // Send mocks base method. 154 func (m *MockSender) Send(arg0 *packetBuffer, arg1 uint16, arg2 protocol.ECN) { 155 m.ctrl.T.Helper() 156 m.ctrl.Call(m, "Send", arg0, arg1, arg2) 157 } 158 159 // Send indicates an expected call of Send. 160 func (mr *MockSenderMockRecorder) Send(arg0, arg1, arg2 any) *SenderSendCall { 161 mr.mock.ctrl.T.Helper() 162 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Send", reflect.TypeOf((*MockSender)(nil).Send), arg0, arg1, arg2) 163 return &SenderSendCall{Call: call} 164 } 165 166 // SenderSendCall wrap *gomock.Call 167 type SenderSendCall struct { 168 *gomock.Call 169 } 170 171 // Return rewrite *gomock.Call.Return 172 func (c *SenderSendCall) Return() *SenderSendCall { 173 c.Call = c.Call.Return() 174 return c 175 } 176 177 // Do rewrite *gomock.Call.Do 178 func (c *SenderSendCall) Do(f func(*packetBuffer, uint16, protocol.ECN)) *SenderSendCall { 179 c.Call = c.Call.Do(f) 180 return c 181 } 182 183 // DoAndReturn rewrite *gomock.Call.DoAndReturn 184 func (c *SenderSendCall) DoAndReturn(f func(*packetBuffer, uint16, protocol.ECN)) *SenderSendCall { 185 c.Call = c.Call.DoAndReturn(f) 186 return c 187 } 188 189 // WouldBlock mocks base method. 190 func (m *MockSender) WouldBlock() bool { 191 m.ctrl.T.Helper() 192 ret := m.ctrl.Call(m, "WouldBlock") 193 ret0, _ := ret[0].(bool) 194 return ret0 195 } 196 197 // WouldBlock indicates an expected call of WouldBlock. 198 func (mr *MockSenderMockRecorder) WouldBlock() *SenderWouldBlockCall { 199 mr.mock.ctrl.T.Helper() 200 call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WouldBlock", reflect.TypeOf((*MockSender)(nil).WouldBlock)) 201 return &SenderWouldBlockCall{Call: call} 202 } 203 204 // SenderWouldBlockCall wrap *gomock.Call 205 type SenderWouldBlockCall struct { 206 *gomock.Call 207 } 208 209 // Return rewrite *gomock.Call.Return 210 func (c *SenderWouldBlockCall) Return(arg0 bool) *SenderWouldBlockCall { 211 c.Call = c.Call.Return(arg0) 212 return c 213 } 214 215 // Do rewrite *gomock.Call.Do 216 func (c *SenderWouldBlockCall) Do(f func() bool) *SenderWouldBlockCall { 217 c.Call = c.Call.Do(f) 218 return c 219 } 220 221 // DoAndReturn rewrite *gomock.Call.DoAndReturn 222 func (c *SenderWouldBlockCall) DoAndReturn(f func() bool) *SenderWouldBlockCall { 223 c.Call = c.Call.DoAndReturn(f) 224 return c 225 }