github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/storage/mock/chunk_data_packs.go (about)

     1  // Code generated by mockery v2.21.4. DO NOT EDIT.
     2  
     3  package mock
     4  
     5  import (
     6  	flow "github.com/onflow/flow-go/model/flow"
     7  	mock "github.com/stretchr/testify/mock"
     8  
     9  	storage "github.com/onflow/flow-go/storage"
    10  )
    11  
    12  // ChunkDataPacks is an autogenerated mock type for the ChunkDataPacks type
    13  type ChunkDataPacks struct {
    14  	mock.Mock
    15  }
    16  
    17  // BatchRemove provides a mock function with given fields: chunkID, batch
    18  func (_m *ChunkDataPacks) BatchRemove(chunkID flow.Identifier, batch storage.BatchStorage) error {
    19  	ret := _m.Called(chunkID, batch)
    20  
    21  	var r0 error
    22  	if rf, ok := ret.Get(0).(func(flow.Identifier, storage.BatchStorage) error); ok {
    23  		r0 = rf(chunkID, batch)
    24  	} else {
    25  		r0 = ret.Error(0)
    26  	}
    27  
    28  	return r0
    29  }
    30  
    31  // BatchStore provides a mock function with given fields: c, batch
    32  func (_m *ChunkDataPacks) BatchStore(c *flow.ChunkDataPack, batch storage.BatchStorage) error {
    33  	ret := _m.Called(c, batch)
    34  
    35  	var r0 error
    36  	if rf, ok := ret.Get(0).(func(*flow.ChunkDataPack, storage.BatchStorage) error); ok {
    37  		r0 = rf(c, batch)
    38  	} else {
    39  		r0 = ret.Error(0)
    40  	}
    41  
    42  	return r0
    43  }
    44  
    45  // ByChunkID provides a mock function with given fields: chunkID
    46  func (_m *ChunkDataPacks) ByChunkID(chunkID flow.Identifier) (*flow.ChunkDataPack, error) {
    47  	ret := _m.Called(chunkID)
    48  
    49  	var r0 *flow.ChunkDataPack
    50  	var r1 error
    51  	if rf, ok := ret.Get(0).(func(flow.Identifier) (*flow.ChunkDataPack, error)); ok {
    52  		return rf(chunkID)
    53  	}
    54  	if rf, ok := ret.Get(0).(func(flow.Identifier) *flow.ChunkDataPack); ok {
    55  		r0 = rf(chunkID)
    56  	} else {
    57  		if ret.Get(0) != nil {
    58  			r0 = ret.Get(0).(*flow.ChunkDataPack)
    59  		}
    60  	}
    61  
    62  	if rf, ok := ret.Get(1).(func(flow.Identifier) error); ok {
    63  		r1 = rf(chunkID)
    64  	} else {
    65  		r1 = ret.Error(1)
    66  	}
    67  
    68  	return r0, r1
    69  }
    70  
    71  // Remove provides a mock function with given fields: cs
    72  func (_m *ChunkDataPacks) Remove(cs []flow.Identifier) error {
    73  	ret := _m.Called(cs)
    74  
    75  	var r0 error
    76  	if rf, ok := ret.Get(0).(func([]flow.Identifier) error); ok {
    77  		r0 = rf(cs)
    78  	} else {
    79  		r0 = ret.Error(0)
    80  	}
    81  
    82  	return r0
    83  }
    84  
    85  // Store provides a mock function with given fields: cs
    86  func (_m *ChunkDataPacks) Store(cs []*flow.ChunkDataPack) error {
    87  	ret := _m.Called(cs)
    88  
    89  	var r0 error
    90  	if rf, ok := ret.Get(0).(func([]*flow.ChunkDataPack) error); ok {
    91  		r0 = rf(cs)
    92  	} else {
    93  		r0 = ret.Error(0)
    94  	}
    95  
    96  	return r0
    97  }
    98  
    99  type mockConstructorTestingTNewChunkDataPacks interface {
   100  	mock.TestingT
   101  	Cleanup(func())
   102  }
   103  
   104  // NewChunkDataPacks creates a new instance of ChunkDataPacks. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
   105  func NewChunkDataPacks(t mockConstructorTestingTNewChunkDataPacks) *ChunkDataPacks {
   106  	mock := &ChunkDataPacks{}
   107  	mock.Mock.Test(t)
   108  
   109  	t.Cleanup(func() { mock.AssertExpectations(t) })
   110  
   111  	return mock
   112  }