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

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