github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/module/mempool/mock/assignments.go (about)

     1  // Code generated by mockery v2.21.4. DO NOT EDIT.
     2  
     3  package mempool
     4  
     5  import (
     6  	chunks "github.com/onflow/flow-go/model/chunks"
     7  	flow "github.com/onflow/flow-go/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  	var r1 bool
    53  	if rf, ok := ret.Get(0).(func(flow.Identifier) (*chunks.Assignment, bool)); ok {
    54  		return rf(assignmentID)
    55  	}
    56  	if rf, ok := ret.Get(0).(func(flow.Identifier) *chunks.Assignment); ok {
    57  		r0 = rf(assignmentID)
    58  	} else {
    59  		if ret.Get(0) != nil {
    60  			r0 = ret.Get(0).(*chunks.Assignment)
    61  		}
    62  	}
    63  
    64  	if rf, ok := ret.Get(1).(func(flow.Identifier) bool); ok {
    65  		r1 = rf(assignmentID)
    66  	} else {
    67  		r1 = ret.Get(1).(bool)
    68  	}
    69  
    70  	return r0, r1
    71  }
    72  
    73  // Has provides a mock function with given fields: assignmentID
    74  func (_m *Assignments) Has(assignmentID flow.Identifier) bool {
    75  	ret := _m.Called(assignmentID)
    76  
    77  	var r0 bool
    78  	if rf, ok := ret.Get(0).(func(flow.Identifier) bool); ok {
    79  		r0 = rf(assignmentID)
    80  	} else {
    81  		r0 = ret.Get(0).(bool)
    82  	}
    83  
    84  	return r0
    85  }
    86  
    87  // Remove provides a mock function with given fields: assignmentID
    88  func (_m *Assignments) Remove(assignmentID flow.Identifier) bool {
    89  	ret := _m.Called(assignmentID)
    90  
    91  	var r0 bool
    92  	if rf, ok := ret.Get(0).(func(flow.Identifier) bool); ok {
    93  		r0 = rf(assignmentID)
    94  	} else {
    95  		r0 = ret.Get(0).(bool)
    96  	}
    97  
    98  	return r0
    99  }
   100  
   101  // Size provides a mock function with given fields:
   102  func (_m *Assignments) Size() uint {
   103  	ret := _m.Called()
   104  
   105  	var r0 uint
   106  	if rf, ok := ret.Get(0).(func() uint); ok {
   107  		r0 = rf()
   108  	} else {
   109  		r0 = ret.Get(0).(uint)
   110  	}
   111  
   112  	return r0
   113  }
   114  
   115  type mockConstructorTestingTNewAssignments interface {
   116  	mock.TestingT
   117  	Cleanup(func())
   118  }
   119  
   120  // 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.
   121  func NewAssignments(t mockConstructorTestingTNewAssignments) *Assignments {
   122  	mock := &Assignments{}
   123  	mock.Mock.Test(t)
   124  
   125  	t.Cleanup(func() { mock.AssertExpectations(t) })
   126  
   127  	return mock
   128  }