-
Notifications
You must be signed in to change notification settings - Fork 208
Expand file tree
/
Copy pathexecution_data_getter.go
More file actions
108 lines (91 loc) · 3.21 KB
/
execution_data_getter.go
File metadata and controls
108 lines (91 loc) · 3.21 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
// Code generated by mockery; DO NOT EDIT.
// github.com/vektra/mockery
// template: testify
package mock
import (
"context"
"github.com/onflow/flow-go/model/flow"
"github.com/onflow/flow-go/module/executiondatasync/execution_data"
mock "github.com/stretchr/testify/mock"
)
// NewExecutionDataGetter creates a new instance of ExecutionDataGetter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewExecutionDataGetter(t interface {
mock.TestingT
Cleanup(func())
}) *ExecutionDataGetter {
mock := &ExecutionDataGetter{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}
// ExecutionDataGetter is an autogenerated mock type for the ExecutionDataGetter type
type ExecutionDataGetter struct {
mock.Mock
}
type ExecutionDataGetter_Expecter struct {
mock *mock.Mock
}
func (_m *ExecutionDataGetter) EXPECT() *ExecutionDataGetter_Expecter {
return &ExecutionDataGetter_Expecter{mock: &_m.Mock}
}
// Get provides a mock function for the type ExecutionDataGetter
func (_mock *ExecutionDataGetter) Get(ctx context.Context, rootID flow.Identifier) (*execution_data.BlockExecutionData, error) {
ret := _mock.Called(ctx, rootID)
if len(ret) == 0 {
panic("no return value specified for Get")
}
var r0 *execution_data.BlockExecutionData
var r1 error
if returnFunc, ok := ret.Get(0).(func(context.Context, flow.Identifier) (*execution_data.BlockExecutionData, error)); ok {
return returnFunc(ctx, rootID)
}
if returnFunc, ok := ret.Get(0).(func(context.Context, flow.Identifier) *execution_data.BlockExecutionData); ok {
r0 = returnFunc(ctx, rootID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*execution_data.BlockExecutionData)
}
}
if returnFunc, ok := ret.Get(1).(func(context.Context, flow.Identifier) error); ok {
r1 = returnFunc(ctx, rootID)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// ExecutionDataGetter_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'
type ExecutionDataGetter_Get_Call struct {
*mock.Call
}
// Get is a helper method to define mock.On call
// - ctx context.Context
// - rootID flow.Identifier
func (_e *ExecutionDataGetter_Expecter) Get(ctx interface{}, rootID interface{}) *ExecutionDataGetter_Get_Call {
return &ExecutionDataGetter_Get_Call{Call: _e.mock.On("Get", ctx, rootID)}
}
func (_c *ExecutionDataGetter_Get_Call) Run(run func(ctx context.Context, rootID flow.Identifier)) *ExecutionDataGetter_Get_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 context.Context
if args[0] != nil {
arg0 = args[0].(context.Context)
}
var arg1 flow.Identifier
if args[1] != nil {
arg1 = args[1].(flow.Identifier)
}
run(
arg0,
arg1,
)
})
return _c
}
func (_c *ExecutionDataGetter_Get_Call) Return(blockExecutionData *execution_data.BlockExecutionData, err error) *ExecutionDataGetter_Get_Call {
_c.Call.Return(blockExecutionData, err)
return _c
}
func (_c *ExecutionDataGetter_Get_Call) RunAndReturn(run func(ctx context.Context, rootID flow.Identifier) (*execution_data.BlockExecutionData, error)) *ExecutionDataGetter_Get_Call {
_c.Call.Return(run)
return _c
}