github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/module/mempool/mock/guarantees.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  // Guarantees is an autogenerated mock type for the Guarantees type
    12  type Guarantees struct {
    13  	mock.Mock
    14  }
    15  
    16  // Add provides a mock function with given fields: guarantee
    17  func (_m *Guarantees) Add(guarantee *flow.CollectionGuarantee) bool {
    18  	ret := _m.Called(guarantee)
    19  
    20  	var r0 bool
    21  	if rf, ok := ret.Get(0).(func(*flow.CollectionGuarantee) bool); ok {
    22  		r0 = rf(guarantee)
    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 *Guarantees) All() []*flow.CollectionGuarantee {
    32  	ret := _m.Called()
    33  
    34  	var r0 []*flow.CollectionGuarantee
    35  	if rf, ok := ret.Get(0).(func() []*flow.CollectionGuarantee); ok {
    36  		r0 = rf()
    37  	} else {
    38  		if ret.Get(0) != nil {
    39  			r0 = ret.Get(0).([]*flow.CollectionGuarantee)
    40  		}
    41  	}
    42  
    43  	return r0
    44  }
    45  
    46  // ByID provides a mock function with given fields: collID
    47  func (_m *Guarantees) ByID(collID flow.Identifier) (*flow.CollectionGuarantee, bool) {
    48  	ret := _m.Called(collID)
    49  
    50  	var r0 *flow.CollectionGuarantee
    51  	var r1 bool
    52  	if rf, ok := ret.Get(0).(func(flow.Identifier) (*flow.CollectionGuarantee, bool)); ok {
    53  		return rf(collID)
    54  	}
    55  	if rf, ok := ret.Get(0).(func(flow.Identifier) *flow.CollectionGuarantee); ok {
    56  		r0 = rf(collID)
    57  	} else {
    58  		if ret.Get(0) != nil {
    59  			r0 = ret.Get(0).(*flow.CollectionGuarantee)
    60  		}
    61  	}
    62  
    63  	if rf, ok := ret.Get(1).(func(flow.Identifier) bool); ok {
    64  		r1 = rf(collID)
    65  	} else {
    66  		r1 = ret.Get(1).(bool)
    67  	}
    68  
    69  	return r0, r1
    70  }
    71  
    72  // Has provides a mock function with given fields: collID
    73  func (_m *Guarantees) Has(collID flow.Identifier) bool {
    74  	ret := _m.Called(collID)
    75  
    76  	var r0 bool
    77  	if rf, ok := ret.Get(0).(func(flow.Identifier) bool); ok {
    78  		r0 = rf(collID)
    79  	} else {
    80  		r0 = ret.Get(0).(bool)
    81  	}
    82  
    83  	return r0
    84  }
    85  
    86  // Remove provides a mock function with given fields: collID
    87  func (_m *Guarantees) Remove(collID flow.Identifier) bool {
    88  	ret := _m.Called(collID)
    89  
    90  	var r0 bool
    91  	if rf, ok := ret.Get(0).(func(flow.Identifier) bool); ok {
    92  		r0 = rf(collID)
    93  	} else {
    94  		r0 = ret.Get(0).(bool)
    95  	}
    96  
    97  	return r0
    98  }
    99  
   100  // Size provides a mock function with given fields:
   101  func (_m *Guarantees) Size() uint {
   102  	ret := _m.Called()
   103  
   104  	var r0 uint
   105  	if rf, ok := ret.Get(0).(func() uint); ok {
   106  		r0 = rf()
   107  	} else {
   108  		r0 = ret.Get(0).(uint)
   109  	}
   110  
   111  	return r0
   112  }
   113  
   114  type mockConstructorTestingTNewGuarantees interface {
   115  	mock.TestingT
   116  	Cleanup(func())
   117  }
   118  
   119  // NewGuarantees creates a new instance of Guarantees. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
   120  func NewGuarantees(t mockConstructorTestingTNewGuarantees) *Guarantees {
   121  	mock := &Guarantees{}
   122  	mock.Mock.Test(t)
   123  
   124  	t.Cleanup(func() { mock.AssertExpectations(t) })
   125  
   126  	return mock
   127  }