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