github.com/quic-go/quic-go@v0.44.0/mock_batch_conn_test.go (about)

     1  // Code generated by MockGen. DO NOT EDIT.
     2  // Source: sys_conn_oob.go
     3  //
     4  // Generated by this command:
     5  //
     6  //	mockgen -typed -package quic -self_package github.com/quic-go/quic-go -source sys_conn_oob.go -destination mock_batch_conn_test.go -mock_names batchConn=MockBatchConn
     7  //
     8  
     9  // Package quic is a generated GoMock package.
    10  package quic
    11  
    12  import (
    13  	reflect "reflect"
    14  
    15  	gomock "go.uber.org/mock/gomock"
    16  	ipv4 "golang.org/x/net/ipv4"
    17  )
    18  
    19  // MockBatchConn is a mock of batchConn interface.
    20  type MockBatchConn struct {
    21  	ctrl     *gomock.Controller
    22  	recorder *MockBatchConnMockRecorder
    23  }
    24  
    25  // MockBatchConnMockRecorder is the mock recorder for MockBatchConn.
    26  type MockBatchConnMockRecorder struct {
    27  	mock *MockBatchConn
    28  }
    29  
    30  // NewMockBatchConn creates a new mock instance.
    31  func NewMockBatchConn(ctrl *gomock.Controller) *MockBatchConn {
    32  	mock := &MockBatchConn{ctrl: ctrl}
    33  	mock.recorder = &MockBatchConnMockRecorder{mock}
    34  	return mock
    35  }
    36  
    37  // EXPECT returns an object that allows the caller to indicate expected use.
    38  func (m *MockBatchConn) EXPECT() *MockBatchConnMockRecorder {
    39  	return m.recorder
    40  }
    41  
    42  // ReadBatch mocks base method.
    43  func (m *MockBatchConn) ReadBatch(ms []ipv4.Message, flags int) (int, error) {
    44  	m.ctrl.T.Helper()
    45  	ret := m.ctrl.Call(m, "ReadBatch", ms, flags)
    46  	ret0, _ := ret[0].(int)
    47  	ret1, _ := ret[1].(error)
    48  	return ret0, ret1
    49  }
    50  
    51  // ReadBatch indicates an expected call of ReadBatch.
    52  func (mr *MockBatchConnMockRecorder) ReadBatch(ms, flags any) *MockBatchConnReadBatchCall {
    53  	mr.mock.ctrl.T.Helper()
    54  	call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadBatch", reflect.TypeOf((*MockBatchConn)(nil).ReadBatch), ms, flags)
    55  	return &MockBatchConnReadBatchCall{Call: call}
    56  }
    57  
    58  // MockBatchConnReadBatchCall wrap *gomock.Call
    59  type MockBatchConnReadBatchCall struct {
    60  	*gomock.Call
    61  }
    62  
    63  // Return rewrite *gomock.Call.Return
    64  func (c *MockBatchConnReadBatchCall) Return(arg0 int, arg1 error) *MockBatchConnReadBatchCall {
    65  	c.Call = c.Call.Return(arg0, arg1)
    66  	return c
    67  }
    68  
    69  // Do rewrite *gomock.Call.Do
    70  func (c *MockBatchConnReadBatchCall) Do(f func([]ipv4.Message, int) (int, error)) *MockBatchConnReadBatchCall {
    71  	c.Call = c.Call.Do(f)
    72  	return c
    73  }
    74  
    75  // DoAndReturn rewrite *gomock.Call.DoAndReturn
    76  func (c *MockBatchConnReadBatchCall) DoAndReturn(f func([]ipv4.Message, int) (int, error)) *MockBatchConnReadBatchCall {
    77  	c.Call = c.Call.DoAndReturn(f)
    78  	return c
    79  }