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