github.com/onflow/flow-go@v0.33.17/engine/execution/mock/register_store.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  
    10  // RegisterStore is an autogenerated mock type for the RegisterStore type
    11  type RegisterStore struct {
    12  	mock.Mock
    13  }
    14  
    15  // GetRegister provides a mock function with given fields: height, blockID, register
    16  func (_m *RegisterStore) GetRegister(height uint64, blockID flow.Identifier, register flow.RegisterID) ([]byte, error) {
    17  	ret := _m.Called(height, blockID, register)
    18  
    19  	var r0 []byte
    20  	var r1 error
    21  	if rf, ok := ret.Get(0).(func(uint64, flow.Identifier, flow.RegisterID) ([]byte, error)); ok {
    22  		return rf(height, blockID, register)
    23  	}
    24  	if rf, ok := ret.Get(0).(func(uint64, flow.Identifier, flow.RegisterID) []byte); ok {
    25  		r0 = rf(height, blockID, register)
    26  	} else {
    27  		if ret.Get(0) != nil {
    28  			r0 = ret.Get(0).([]byte)
    29  		}
    30  	}
    31  
    32  	if rf, ok := ret.Get(1).(func(uint64, flow.Identifier, flow.RegisterID) error); ok {
    33  		r1 = rf(height, blockID, register)
    34  	} else {
    35  		r1 = ret.Error(1)
    36  	}
    37  
    38  	return r0, r1
    39  }
    40  
    41  // IsBlockExecuted provides a mock function with given fields: height, blockID
    42  func (_m *RegisterStore) IsBlockExecuted(height uint64, blockID flow.Identifier) (bool, error) {
    43  	ret := _m.Called(height, blockID)
    44  
    45  	var r0 bool
    46  	var r1 error
    47  	if rf, ok := ret.Get(0).(func(uint64, flow.Identifier) (bool, error)); ok {
    48  		return rf(height, blockID)
    49  	}
    50  	if rf, ok := ret.Get(0).(func(uint64, flow.Identifier) bool); ok {
    51  		r0 = rf(height, blockID)
    52  	} else {
    53  		r0 = ret.Get(0).(bool)
    54  	}
    55  
    56  	if rf, ok := ret.Get(1).(func(uint64, flow.Identifier) error); ok {
    57  		r1 = rf(height, blockID)
    58  	} else {
    59  		r1 = ret.Error(1)
    60  	}
    61  
    62  	return r0, r1
    63  }
    64  
    65  // LastFinalizedAndExecutedHeight provides a mock function with given fields:
    66  func (_m *RegisterStore) LastFinalizedAndExecutedHeight() uint64 {
    67  	ret := _m.Called()
    68  
    69  	var r0 uint64
    70  	if rf, ok := ret.Get(0).(func() uint64); ok {
    71  		r0 = rf()
    72  	} else {
    73  		r0 = ret.Get(0).(uint64)
    74  	}
    75  
    76  	return r0
    77  }
    78  
    79  // OnBlockFinalized provides a mock function with given fields:
    80  func (_m *RegisterStore) OnBlockFinalized() error {
    81  	ret := _m.Called()
    82  
    83  	var r0 error
    84  	if rf, ok := ret.Get(0).(func() error); ok {
    85  		r0 = rf()
    86  	} else {
    87  		r0 = ret.Error(0)
    88  	}
    89  
    90  	return r0
    91  }
    92  
    93  // SaveRegisters provides a mock function with given fields: header, registers
    94  func (_m *RegisterStore) SaveRegisters(header *flow.Header, registers flow.RegisterEntries) error {
    95  	ret := _m.Called(header, registers)
    96  
    97  	var r0 error
    98  	if rf, ok := ret.Get(0).(func(*flow.Header, flow.RegisterEntries) error); ok {
    99  		r0 = rf(header, registers)
   100  	} else {
   101  		r0 = ret.Error(0)
   102  	}
   103  
   104  	return r0
   105  }
   106  
   107  type mockConstructorTestingTNewRegisterStore interface {
   108  	mock.TestingT
   109  	Cleanup(func())
   110  }
   111  
   112  // NewRegisterStore creates a new instance of RegisterStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
   113  func NewRegisterStore(t mockConstructorTestingTNewRegisterStore) *RegisterStore {
   114  	mock := &RegisterStore{}
   115  	mock.Mock.Test(t)
   116  
   117  	t.Cleanup(func() { mock.AssertExpectations(t) })
   118  
   119  	return mock
   120  }