-
Notifications
You must be signed in to change notification settings - Fork 177
/
key_value_store_state_machine_factory.go
58 lines (45 loc) · 2.37 KB
/
key_value_store_state_machine_factory.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// Code generated by mockery v2.21.4. DO NOT EDIT.
package mock
import (
flow "github.com/onflow/flow-go/model/flow"
mock "github.com/stretchr/testify/mock"
protocol "github.com/onflow/flow-go/state/protocol"
protocol_state "github.com/onflow/flow-go/state/protocol/protocol_state"
)
// KeyValueStoreStateMachineFactory is an autogenerated mock type for the KeyValueStoreStateMachineFactory type
type KeyValueStoreStateMachineFactory struct {
mock.Mock
}
// Create provides a mock function with given fields: candidateView, parentID, parentState, mutator
func (_m *KeyValueStoreStateMachineFactory) Create(candidateView uint64, parentID flow.Identifier, parentState protocol.KVStoreReader, mutator protocol_state.KVStoreMutator) (protocol_state.OrthogonalStoreStateMachine[protocol.KVStoreReader], error) {
ret := _m.Called(candidateView, parentID, parentState, mutator)
var r0 protocol_state.OrthogonalStoreStateMachine[protocol.KVStoreReader]
var r1 error
if rf, ok := ret.Get(0).(func(uint64, flow.Identifier, protocol.KVStoreReader, protocol_state.KVStoreMutator) (protocol_state.OrthogonalStoreStateMachine[protocol.KVStoreReader], error)); ok {
return rf(candidateView, parentID, parentState, mutator)
}
if rf, ok := ret.Get(0).(func(uint64, flow.Identifier, protocol.KVStoreReader, protocol_state.KVStoreMutator) protocol_state.OrthogonalStoreStateMachine[protocol.KVStoreReader]); ok {
r0 = rf(candidateView, parentID, parentState, mutator)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(protocol_state.OrthogonalStoreStateMachine[protocol.KVStoreReader])
}
}
if rf, ok := ret.Get(1).(func(uint64, flow.Identifier, protocol.KVStoreReader, protocol_state.KVStoreMutator) error); ok {
r1 = rf(candidateView, parentID, parentState, mutator)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
type mockConstructorTestingTNewKeyValueStoreStateMachineFactory interface {
mock.TestingT
Cleanup(func())
}
// NewKeyValueStoreStateMachineFactory creates a new instance of KeyValueStoreStateMachineFactory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewKeyValueStoreStateMachineFactory(t mockConstructorTestingTNewKeyValueStoreStateMachineFactory) *KeyValueStoreStateMachineFactory {
mock := &KeyValueStoreStateMachineFactory{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}