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