github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/network/mocknetwork/compressor.go (about)

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