-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
tx_strategy.go
77 lines (60 loc) · 1.86 KB
/
tx_strategy.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
// Code generated by mockery v2.38.0. DO NOT EDIT.
package mocks
import (
context "context"
types "github.com/smartcontractkit/chainlink/v2/common/txmgr/types"
mock "github.com/stretchr/testify/mock"
uuid "github.com/google/uuid"
)
// TxStrategy is an autogenerated mock type for the TxStrategy type
type TxStrategy struct {
mock.Mock
}
// PruneQueue provides a mock function with given fields: ctx, pruneService
func (_m *TxStrategy) PruneQueue(ctx context.Context, pruneService types.UnstartedTxQueuePruner) (int64, error) {
ret := _m.Called(ctx, pruneService)
if len(ret) == 0 {
panic("no return value specified for PruneQueue")
}
var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, types.UnstartedTxQueuePruner) (int64, error)); ok {
return rf(ctx, pruneService)
}
if rf, ok := ret.Get(0).(func(context.Context, types.UnstartedTxQueuePruner) int64); ok {
r0 = rf(ctx, pruneService)
} else {
r0 = ret.Get(0).(int64)
}
if rf, ok := ret.Get(1).(func(context.Context, types.UnstartedTxQueuePruner) error); ok {
r1 = rf(ctx, pruneService)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Subject provides a mock function with given fields:
func (_m *TxStrategy) Subject() uuid.NullUUID {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for Subject")
}
var r0 uuid.NullUUID
if rf, ok := ret.Get(0).(func() uuid.NullUUID); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(uuid.NullUUID)
}
return r0
}
// NewTxStrategy creates a new instance of TxStrategy. 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 NewTxStrategy(t interface {
mock.TestingT
Cleanup(func())
}) *TxStrategy {
mock := &TxStrategy{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}