github.com/koko1123/flow-go-1@v0.29.6/module/mempool/mock/pending_receipts.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  	mock "github.com/stretchr/testify/mock"
     9  )
    10  
    11  // PendingReceipts is an autogenerated mock type for the PendingReceipts type
    12  type PendingReceipts struct {
    13  	mock.Mock
    14  }
    15  
    16  // Add provides a mock function with given fields: receipt
    17  func (_m *PendingReceipts) Add(receipt *flow.ExecutionReceipt) bool {
    18  	ret := _m.Called(receipt)
    19  
    20  	var r0 bool
    21  	if rf, ok := ret.Get(0).(func(*flow.ExecutionReceipt) bool); ok {
    22  		r0 = rf(receipt)
    23  	} else {
    24  		r0 = ret.Get(0).(bool)
    25  	}
    26  
    27  	return r0
    28  }
    29  
    30  // ByPreviousResultID provides a mock function with given fields: previousReusltID
    31  func (_m *PendingReceipts) ByPreviousResultID(previousReusltID flow.Identifier) []*flow.ExecutionReceipt {
    32  	ret := _m.Called(previousReusltID)
    33  
    34  	var r0 []*flow.ExecutionReceipt
    35  	if rf, ok := ret.Get(0).(func(flow.Identifier) []*flow.ExecutionReceipt); ok {
    36  		r0 = rf(previousReusltID)
    37  	} else {
    38  		if ret.Get(0) != nil {
    39  			r0 = ret.Get(0).([]*flow.ExecutionReceipt)
    40  		}
    41  	}
    42  
    43  	return r0
    44  }
    45  
    46  // PruneUpToHeight provides a mock function with given fields: height
    47  func (_m *PendingReceipts) PruneUpToHeight(height uint64) error {
    48  	ret := _m.Called(height)
    49  
    50  	var r0 error
    51  	if rf, ok := ret.Get(0).(func(uint64) error); ok {
    52  		r0 = rf(height)
    53  	} else {
    54  		r0 = ret.Error(0)
    55  	}
    56  
    57  	return r0
    58  }
    59  
    60  // Remove provides a mock function with given fields: receiptID
    61  func (_m *PendingReceipts) Remove(receiptID flow.Identifier) bool {
    62  	ret := _m.Called(receiptID)
    63  
    64  	var r0 bool
    65  	if rf, ok := ret.Get(0).(func(flow.Identifier) bool); ok {
    66  		r0 = rf(receiptID)
    67  	} else {
    68  		r0 = ret.Get(0).(bool)
    69  	}
    70  
    71  	return r0
    72  }
    73  
    74  type mockConstructorTestingTNewPendingReceipts interface {
    75  	mock.TestingT
    76  	Cleanup(func())
    77  }
    78  
    79  // NewPendingReceipts creates a new instance of PendingReceipts. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    80  func NewPendingReceipts(t mockConstructorTestingTNewPendingReceipts) *PendingReceipts {
    81  	mock := &PendingReceipts{}
    82  	mock.Mock.Test(t)
    83  
    84  	t.Cleanup(func() { mock.AssertExpectations(t) })
    85  
    86  	return mock
    87  }