-
Notifications
You must be signed in to change notification settings - Fork 649
/
mock_ethtxmanager.go
104 lines (82 loc) · 3.57 KB
/
mock_ethtxmanager.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
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
// Code generated by mockery v2.32.0. DO NOT EDIT.
package mocks
import (
context "context"
big "math/big"
common "github.com/ethereum/go-ethereum/common"
ethtxmanager "github.com/0xPolygonHermez/zkevm-node/ethtxmanager"
mock "github.com/stretchr/testify/mock"
pgx "github.com/jackc/pgx/v4"
)
// EthTxManager is an autogenerated mock type for the ethTxManager type
type EthTxManager struct {
mock.Mock
}
// Add provides a mock function with given fields: ctx, owner, id, from, to, value, data, gasOffset, dbTx
func (_m *EthTxManager) Add(ctx context.Context, owner string, id string, from common.Address, to *common.Address, value *big.Int, data []byte, gasOffset uint64, dbTx pgx.Tx) error {
ret := _m.Called(ctx, owner, id, from, to, value, data, gasOffset, dbTx)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string, string, common.Address, *common.Address, *big.Int, []byte, uint64, pgx.Tx) error); ok {
r0 = rf(ctx, owner, id, from, to, value, data, gasOffset, dbTx)
} else {
r0 = ret.Error(0)
}
return r0
}
// ProcessPendingMonitoredTxs provides a mock function with given fields: ctx, owner, failedResultHandler, dbTx
func (_m *EthTxManager) ProcessPendingMonitoredTxs(ctx context.Context, owner string, failedResultHandler ethtxmanager.ResultHandler, dbTx pgx.Tx) {
_m.Called(ctx, owner, failedResultHandler, dbTx)
}
// Result provides a mock function with given fields: ctx, owner, id, dbTx
func (_m *EthTxManager) Result(ctx context.Context, owner string, id string, dbTx pgx.Tx) (ethtxmanager.MonitoredTxResult, error) {
ret := _m.Called(ctx, owner, id, dbTx)
var r0 ethtxmanager.MonitoredTxResult
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, string, pgx.Tx) (ethtxmanager.MonitoredTxResult, error)); ok {
return rf(ctx, owner, id, dbTx)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string, pgx.Tx) ethtxmanager.MonitoredTxResult); ok {
r0 = rf(ctx, owner, id, dbTx)
} else {
r0 = ret.Get(0).(ethtxmanager.MonitoredTxResult)
}
if rf, ok := ret.Get(1).(func(context.Context, string, string, pgx.Tx) error); ok {
r1 = rf(ctx, owner, id, dbTx)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// ResultsByStatus provides a mock function with given fields: ctx, owner, statuses, dbTx
func (_m *EthTxManager) ResultsByStatus(ctx context.Context, owner string, statuses []ethtxmanager.MonitoredTxStatus, dbTx pgx.Tx) ([]ethtxmanager.MonitoredTxResult, error) {
ret := _m.Called(ctx, owner, statuses, dbTx)
var r0 []ethtxmanager.MonitoredTxResult
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, []ethtxmanager.MonitoredTxStatus, pgx.Tx) ([]ethtxmanager.MonitoredTxResult, error)); ok {
return rf(ctx, owner, statuses, dbTx)
}
if rf, ok := ret.Get(0).(func(context.Context, string, []ethtxmanager.MonitoredTxStatus, pgx.Tx) []ethtxmanager.MonitoredTxResult); ok {
r0 = rf(ctx, owner, statuses, dbTx)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]ethtxmanager.MonitoredTxResult)
}
}
if rf, ok := ret.Get(1).(func(context.Context, string, []ethtxmanager.MonitoredTxStatus, pgx.Tx) error); ok {
r1 = rf(ctx, owner, statuses, dbTx)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// NewEthTxManager creates a new instance of EthTxManager. 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 NewEthTxManager(t interface {
mock.TestingT
Cleanup(func())
}) *EthTxManager {
mock := &EthTxManager{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}