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