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