github.com/koko1123/flow-go-1@v0.29.6/module/mempool/mock/transaction_timings.go (about) 1 // Code generated by mockery v2.13.1. DO NOT EDIT. 2 3 package mempool 4 5 import ( 6 flow "github.com/koko1123/flow-go-1/model/flow" 7 8 mock "github.com/stretchr/testify/mock" 9 ) 10 11 // TransactionTimings is an autogenerated mock type for the TransactionTimings type 12 type TransactionTimings struct { 13 mock.Mock 14 } 15 16 // Add provides a mock function with given fields: tx 17 func (_m *TransactionTimings) Add(tx *flow.TransactionTiming) bool { 18 ret := _m.Called(tx) 19 20 var r0 bool 21 if rf, ok := ret.Get(0).(func(*flow.TransactionTiming) bool); ok { 22 r0 = rf(tx) 23 } else { 24 r0 = ret.Get(0).(bool) 25 } 26 27 return r0 28 } 29 30 // Adjust provides a mock function with given fields: txID, f 31 func (_m *TransactionTimings) Adjust(txID flow.Identifier, f func(*flow.TransactionTiming) *flow.TransactionTiming) (*flow.TransactionTiming, bool) { 32 ret := _m.Called(txID, f) 33 34 var r0 *flow.TransactionTiming 35 if rf, ok := ret.Get(0).(func(flow.Identifier, func(*flow.TransactionTiming) *flow.TransactionTiming) *flow.TransactionTiming); ok { 36 r0 = rf(txID, f) 37 } else { 38 if ret.Get(0) != nil { 39 r0 = ret.Get(0).(*flow.TransactionTiming) 40 } 41 } 42 43 var r1 bool 44 if rf, ok := ret.Get(1).(func(flow.Identifier, func(*flow.TransactionTiming) *flow.TransactionTiming) bool); ok { 45 r1 = rf(txID, f) 46 } else { 47 r1 = ret.Get(1).(bool) 48 } 49 50 return r0, r1 51 } 52 53 // All provides a mock function with given fields: 54 func (_m *TransactionTimings) All() []*flow.TransactionTiming { 55 ret := _m.Called() 56 57 var r0 []*flow.TransactionTiming 58 if rf, ok := ret.Get(0).(func() []*flow.TransactionTiming); ok { 59 r0 = rf() 60 } else { 61 if ret.Get(0) != nil { 62 r0 = ret.Get(0).([]*flow.TransactionTiming) 63 } 64 } 65 66 return r0 67 } 68 69 // ByID provides a mock function with given fields: txID 70 func (_m *TransactionTimings) ByID(txID flow.Identifier) (*flow.TransactionTiming, bool) { 71 ret := _m.Called(txID) 72 73 var r0 *flow.TransactionTiming 74 if rf, ok := ret.Get(0).(func(flow.Identifier) *flow.TransactionTiming); ok { 75 r0 = rf(txID) 76 } else { 77 if ret.Get(0) != nil { 78 r0 = ret.Get(0).(*flow.TransactionTiming) 79 } 80 } 81 82 var r1 bool 83 if rf, ok := ret.Get(1).(func(flow.Identifier) bool); ok { 84 r1 = rf(txID) 85 } else { 86 r1 = ret.Get(1).(bool) 87 } 88 89 return r0, r1 90 } 91 92 // Remove provides a mock function with given fields: txID 93 func (_m *TransactionTimings) Remove(txID flow.Identifier) bool { 94 ret := _m.Called(txID) 95 96 var r0 bool 97 if rf, ok := ret.Get(0).(func(flow.Identifier) bool); ok { 98 r0 = rf(txID) 99 } else { 100 r0 = ret.Get(0).(bool) 101 } 102 103 return r0 104 } 105 106 type mockConstructorTestingTNewTransactionTimings interface { 107 mock.TestingT 108 Cleanup(func()) 109 } 110 111 // NewTransactionTimings creates a new instance of TransactionTimings. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 112 func NewTransactionTimings(t mockConstructorTestingTNewTransactionTimings) *TransactionTimings { 113 mock := &TransactionTimings{} 114 mock.Mock.Test(t) 115 116 t.Cleanup(func() { mock.AssertExpectations(t) }) 117 118 return mock 119 }