github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/state/protocol/protocol_state/mock/kv_store_mutator.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  	protocol "github.com/onflow/flow-go/state/protocol"
    10  )
    11  
    12  // KVStoreMutator is an autogenerated mock type for the KVStoreMutator type
    13  type KVStoreMutator struct {
    14  	mock.Mock
    15  }
    16  
    17  // GetEpochStateID provides a mock function with given fields:
    18  func (_m *KVStoreMutator) GetEpochStateID() flow.Identifier {
    19  	ret := _m.Called()
    20  
    21  	var r0 flow.Identifier
    22  	if rf, ok := ret.Get(0).(func() flow.Identifier); ok {
    23  		r0 = rf()
    24  	} else {
    25  		if ret.Get(0) != nil {
    26  			r0 = ret.Get(0).(flow.Identifier)
    27  		}
    28  	}
    29  
    30  	return r0
    31  }
    32  
    33  // GetProtocolStateVersion provides a mock function with given fields:
    34  func (_m *KVStoreMutator) GetProtocolStateVersion() uint64 {
    35  	ret := _m.Called()
    36  
    37  	var r0 uint64
    38  	if rf, ok := ret.Get(0).(func() uint64); ok {
    39  		r0 = rf()
    40  	} else {
    41  		r0 = ret.Get(0).(uint64)
    42  	}
    43  
    44  	return r0
    45  }
    46  
    47  // GetVersionUpgrade provides a mock function with given fields:
    48  func (_m *KVStoreMutator) GetVersionUpgrade() *protocol.ViewBasedActivator[uint64] {
    49  	ret := _m.Called()
    50  
    51  	var r0 *protocol.ViewBasedActivator[uint64]
    52  	if rf, ok := ret.Get(0).(func() *protocol.ViewBasedActivator[uint64]); ok {
    53  		r0 = rf()
    54  	} else {
    55  		if ret.Get(0) != nil {
    56  			r0 = ret.Get(0).(*protocol.ViewBasedActivator[uint64])
    57  		}
    58  	}
    59  
    60  	return r0
    61  }
    62  
    63  // ID provides a mock function with given fields:
    64  func (_m *KVStoreMutator) ID() flow.Identifier {
    65  	ret := _m.Called()
    66  
    67  	var r0 flow.Identifier
    68  	if rf, ok := ret.Get(0).(func() flow.Identifier); ok {
    69  		r0 = rf()
    70  	} else {
    71  		if ret.Get(0) != nil {
    72  			r0 = ret.Get(0).(flow.Identifier)
    73  		}
    74  	}
    75  
    76  	return r0
    77  }
    78  
    79  // SetEpochStateID provides a mock function with given fields: stateID
    80  func (_m *KVStoreMutator) SetEpochStateID(stateID flow.Identifier) {
    81  	_m.Called(stateID)
    82  }
    83  
    84  // SetVersionUpgrade provides a mock function with given fields: version
    85  func (_m *KVStoreMutator) SetVersionUpgrade(version *protocol.ViewBasedActivator[uint64]) {
    86  	_m.Called(version)
    87  }
    88  
    89  // VersionedEncode provides a mock function with given fields:
    90  func (_m *KVStoreMutator) VersionedEncode() (uint64, []byte, error) {
    91  	ret := _m.Called()
    92  
    93  	var r0 uint64
    94  	var r1 []byte
    95  	var r2 error
    96  	if rf, ok := ret.Get(0).(func() (uint64, []byte, error)); ok {
    97  		return rf()
    98  	}
    99  	if rf, ok := ret.Get(0).(func() uint64); ok {
   100  		r0 = rf()
   101  	} else {
   102  		r0 = ret.Get(0).(uint64)
   103  	}
   104  
   105  	if rf, ok := ret.Get(1).(func() []byte); ok {
   106  		r1 = rf()
   107  	} else {
   108  		if ret.Get(1) != nil {
   109  			r1 = ret.Get(1).([]byte)
   110  		}
   111  	}
   112  
   113  	if rf, ok := ret.Get(2).(func() error); ok {
   114  		r2 = rf()
   115  	} else {
   116  		r2 = ret.Error(2)
   117  	}
   118  
   119  	return r0, r1, r2
   120  }
   121  
   122  type mockConstructorTestingTNewKVStoreMutator interface {
   123  	mock.TestingT
   124  	Cleanup(func())
   125  }
   126  
   127  // NewKVStoreMutator creates a new instance of KVStoreMutator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
   128  func NewKVStoreMutator(t mockConstructorTestingTNewKVStoreMutator) *KVStoreMutator {
   129  	mock := &KVStoreMutator{}
   130  	mock.Mock.Test(t)
   131  
   132  	t.Cleanup(func() { mock.AssertExpectations(t) })
   133  
   134  	return mock
   135  }