github.com/koko1123/flow-go-1@v0.29.6/module/mempool/mock/deltas.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 messages "github.com/koko1123/flow-go-1/model/messages" 9 10 mock "github.com/stretchr/testify/mock" 11 ) 12 13 // Deltas is an autogenerated mock type for the Deltas type 14 type Deltas struct { 15 mock.Mock 16 } 17 18 // Add provides a mock function with given fields: delta 19 func (_m *Deltas) Add(delta *messages.ExecutionStateDelta) bool { 20 ret := _m.Called(delta) 21 22 var r0 bool 23 if rf, ok := ret.Get(0).(func(*messages.ExecutionStateDelta) bool); ok { 24 r0 = rf(delta) 25 } else { 26 r0 = ret.Get(0).(bool) 27 } 28 29 return r0 30 } 31 32 // All provides a mock function with given fields: 33 func (_m *Deltas) All() []*messages.ExecutionStateDelta { 34 ret := _m.Called() 35 36 var r0 []*messages.ExecutionStateDelta 37 if rf, ok := ret.Get(0).(func() []*messages.ExecutionStateDelta); ok { 38 r0 = rf() 39 } else { 40 if ret.Get(0) != nil { 41 r0 = ret.Get(0).([]*messages.ExecutionStateDelta) 42 } 43 } 44 45 return r0 46 } 47 48 // ByBlockID provides a mock function with given fields: blockID 49 func (_m *Deltas) ByBlockID(blockID flow.Identifier) (*messages.ExecutionStateDelta, bool) { 50 ret := _m.Called(blockID) 51 52 var r0 *messages.ExecutionStateDelta 53 if rf, ok := ret.Get(0).(func(flow.Identifier) *messages.ExecutionStateDelta); ok { 54 r0 = rf(blockID) 55 } else { 56 if ret.Get(0) != nil { 57 r0 = ret.Get(0).(*messages.ExecutionStateDelta) 58 } 59 } 60 61 var r1 bool 62 if rf, ok := ret.Get(1).(func(flow.Identifier) bool); ok { 63 r1 = rf(blockID) 64 } else { 65 r1 = ret.Get(1).(bool) 66 } 67 68 return r0, r1 69 } 70 71 // Has provides a mock function with given fields: blockID 72 func (_m *Deltas) Has(blockID flow.Identifier) bool { 73 ret := _m.Called(blockID) 74 75 var r0 bool 76 if rf, ok := ret.Get(0).(func(flow.Identifier) bool); ok { 77 r0 = rf(blockID) 78 } else { 79 r0 = ret.Get(0).(bool) 80 } 81 82 return r0 83 } 84 85 // Limit provides a mock function with given fields: 86 func (_m *Deltas) Limit() uint { 87 ret := _m.Called() 88 89 var r0 uint 90 if rf, ok := ret.Get(0).(func() uint); ok { 91 r0 = rf() 92 } else { 93 r0 = ret.Get(0).(uint) 94 } 95 96 return r0 97 } 98 99 // Remove provides a mock function with given fields: blockID 100 func (_m *Deltas) Remove(blockID flow.Identifier) bool { 101 ret := _m.Called(blockID) 102 103 var r0 bool 104 if rf, ok := ret.Get(0).(func(flow.Identifier) bool); ok { 105 r0 = rf(blockID) 106 } else { 107 r0 = ret.Get(0).(bool) 108 } 109 110 return r0 111 } 112 113 // Size provides a mock function with given fields: 114 func (_m *Deltas) Size() uint { 115 ret := _m.Called() 116 117 var r0 uint 118 if rf, ok := ret.Get(0).(func() uint); ok { 119 r0 = rf() 120 } else { 121 r0 = ret.Get(0).(uint) 122 } 123 124 return r0 125 } 126 127 type mockConstructorTestingTNewDeltas interface { 128 mock.TestingT 129 Cleanup(func()) 130 } 131 132 // NewDeltas creates a new instance of Deltas. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 133 func NewDeltas(t mockConstructorTestingTNewDeltas) *Deltas { 134 mock := &Deltas{} 135 mock.Mock.Test(t) 136 137 t.Cleanup(func() { mock.AssertExpectations(t) }) 138 139 return mock 140 }