github.com/koko1123/flow-go-1@v0.29.6/network/mocknetwork/write_close_flusher.go (about)

     1  // Code generated by mockery v2.13.1. DO NOT EDIT.
     2  
     3  package mocknetwork
     4  
     5  import mock "github.com/stretchr/testify/mock"
     6  
     7  // WriteCloseFlusher is an autogenerated mock type for the WriteCloseFlusher type
     8  type WriteCloseFlusher struct {
     9  	mock.Mock
    10  }
    11  
    12  // Close provides a mock function with given fields:
    13  func (_m *WriteCloseFlusher) Close() error {
    14  	ret := _m.Called()
    15  
    16  	var r0 error
    17  	if rf, ok := ret.Get(0).(func() error); ok {
    18  		r0 = rf()
    19  	} else {
    20  		r0 = ret.Error(0)
    21  	}
    22  
    23  	return r0
    24  }
    25  
    26  // Flush provides a mock function with given fields:
    27  func (_m *WriteCloseFlusher) Flush() error {
    28  	ret := _m.Called()
    29  
    30  	var r0 error
    31  	if rf, ok := ret.Get(0).(func() error); ok {
    32  		r0 = rf()
    33  	} else {
    34  		r0 = ret.Error(0)
    35  	}
    36  
    37  	return r0
    38  }
    39  
    40  // Write provides a mock function with given fields: p
    41  func (_m *WriteCloseFlusher) Write(p []byte) (int, error) {
    42  	ret := _m.Called(p)
    43  
    44  	var r0 int
    45  	if rf, ok := ret.Get(0).(func([]byte) int); ok {
    46  		r0 = rf(p)
    47  	} else {
    48  		r0 = ret.Get(0).(int)
    49  	}
    50  
    51  	var r1 error
    52  	if rf, ok := ret.Get(1).(func([]byte) error); ok {
    53  		r1 = rf(p)
    54  	} else {
    55  		r1 = ret.Error(1)
    56  	}
    57  
    58  	return r0, r1
    59  }
    60  
    61  type mockConstructorTestingTNewWriteCloseFlusher interface {
    62  	mock.TestingT
    63  	Cleanup(func())
    64  }
    65  
    66  // NewWriteCloseFlusher creates a new instance of WriteCloseFlusher. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    67  func NewWriteCloseFlusher(t mockConstructorTestingTNewWriteCloseFlusher) *WriteCloseFlusher {
    68  	mock := &WriteCloseFlusher{}
    69  	mock.Mock.Test(t)
    70  
    71  	t.Cleanup(func() { mock.AssertExpectations(t) })
    72  
    73  	return mock
    74  }