github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/engine/consensus/approvals/mock/assignment_collector.go (about)

     1  // Code generated by mockery v2.21.4. DO NOT EDIT.
     2  
     3  package mock
     4  
     5  import (
     6  	consensus "github.com/onflow/flow-go/engine/consensus"
     7  	approvals "github.com/onflow/flow-go/engine/consensus/approvals"
     8  
     9  	flow "github.com/onflow/flow-go/model/flow"
    10  
    11  	mock "github.com/stretchr/testify/mock"
    12  )
    13  
    14  // AssignmentCollector is an autogenerated mock type for the AssignmentCollector type
    15  type AssignmentCollector struct {
    16  	mock.Mock
    17  }
    18  
    19  // Block provides a mock function with given fields:
    20  func (_m *AssignmentCollector) Block() *flow.Header {
    21  	ret := _m.Called()
    22  
    23  	var r0 *flow.Header
    24  	if rf, ok := ret.Get(0).(func() *flow.Header); ok {
    25  		r0 = rf()
    26  	} else {
    27  		if ret.Get(0) != nil {
    28  			r0 = ret.Get(0).(*flow.Header)
    29  		}
    30  	}
    31  
    32  	return r0
    33  }
    34  
    35  // BlockID provides a mock function with given fields:
    36  func (_m *AssignmentCollector) BlockID() flow.Identifier {
    37  	ret := _m.Called()
    38  
    39  	var r0 flow.Identifier
    40  	if rf, ok := ret.Get(0).(func() flow.Identifier); ok {
    41  		r0 = rf()
    42  	} else {
    43  		if ret.Get(0) != nil {
    44  			r0 = ret.Get(0).(flow.Identifier)
    45  		}
    46  	}
    47  
    48  	return r0
    49  }
    50  
    51  // ChangeProcessingStatus provides a mock function with given fields: expectedValue, newValue
    52  func (_m *AssignmentCollector) ChangeProcessingStatus(expectedValue approvals.ProcessingStatus, newValue approvals.ProcessingStatus) error {
    53  	ret := _m.Called(expectedValue, newValue)
    54  
    55  	var r0 error
    56  	if rf, ok := ret.Get(0).(func(approvals.ProcessingStatus, approvals.ProcessingStatus) error); ok {
    57  		r0 = rf(expectedValue, newValue)
    58  	} else {
    59  		r0 = ret.Error(0)
    60  	}
    61  
    62  	return r0
    63  }
    64  
    65  // CheckEmergencySealing provides a mock function with given fields: observer, finalizedBlockHeight
    66  func (_m *AssignmentCollector) CheckEmergencySealing(observer consensus.SealingObservation, finalizedBlockHeight uint64) error {
    67  	ret := _m.Called(observer, finalizedBlockHeight)
    68  
    69  	var r0 error
    70  	if rf, ok := ret.Get(0).(func(consensus.SealingObservation, uint64) error); ok {
    71  		r0 = rf(observer, finalizedBlockHeight)
    72  	} else {
    73  		r0 = ret.Error(0)
    74  	}
    75  
    76  	return r0
    77  }
    78  
    79  // ProcessApproval provides a mock function with given fields: approval
    80  func (_m *AssignmentCollector) ProcessApproval(approval *flow.ResultApproval) error {
    81  	ret := _m.Called(approval)
    82  
    83  	var r0 error
    84  	if rf, ok := ret.Get(0).(func(*flow.ResultApproval) error); ok {
    85  		r0 = rf(approval)
    86  	} else {
    87  		r0 = ret.Error(0)
    88  	}
    89  
    90  	return r0
    91  }
    92  
    93  // ProcessIncorporatedResult provides a mock function with given fields: incorporatedResult
    94  func (_m *AssignmentCollector) ProcessIncorporatedResult(incorporatedResult *flow.IncorporatedResult) error {
    95  	ret := _m.Called(incorporatedResult)
    96  
    97  	var r0 error
    98  	if rf, ok := ret.Get(0).(func(*flow.IncorporatedResult) error); ok {
    99  		r0 = rf(incorporatedResult)
   100  	} else {
   101  		r0 = ret.Error(0)
   102  	}
   103  
   104  	return r0
   105  }
   106  
   107  // ProcessingStatus provides a mock function with given fields:
   108  func (_m *AssignmentCollector) ProcessingStatus() approvals.ProcessingStatus {
   109  	ret := _m.Called()
   110  
   111  	var r0 approvals.ProcessingStatus
   112  	if rf, ok := ret.Get(0).(func() approvals.ProcessingStatus); ok {
   113  		r0 = rf()
   114  	} else {
   115  		r0 = ret.Get(0).(approvals.ProcessingStatus)
   116  	}
   117  
   118  	return r0
   119  }
   120  
   121  // RequestMissingApprovals provides a mock function with given fields: observer, maxHeightForRequesting
   122  func (_m *AssignmentCollector) RequestMissingApprovals(observer consensus.SealingObservation, maxHeightForRequesting uint64) (uint, error) {
   123  	ret := _m.Called(observer, maxHeightForRequesting)
   124  
   125  	var r0 uint
   126  	var r1 error
   127  	if rf, ok := ret.Get(0).(func(consensus.SealingObservation, uint64) (uint, error)); ok {
   128  		return rf(observer, maxHeightForRequesting)
   129  	}
   130  	if rf, ok := ret.Get(0).(func(consensus.SealingObservation, uint64) uint); ok {
   131  		r0 = rf(observer, maxHeightForRequesting)
   132  	} else {
   133  		r0 = ret.Get(0).(uint)
   134  	}
   135  
   136  	if rf, ok := ret.Get(1).(func(consensus.SealingObservation, uint64) error); ok {
   137  		r1 = rf(observer, maxHeightForRequesting)
   138  	} else {
   139  		r1 = ret.Error(1)
   140  	}
   141  
   142  	return r0, r1
   143  }
   144  
   145  // Result provides a mock function with given fields:
   146  func (_m *AssignmentCollector) Result() *flow.ExecutionResult {
   147  	ret := _m.Called()
   148  
   149  	var r0 *flow.ExecutionResult
   150  	if rf, ok := ret.Get(0).(func() *flow.ExecutionResult); ok {
   151  		r0 = rf()
   152  	} else {
   153  		if ret.Get(0) != nil {
   154  			r0 = ret.Get(0).(*flow.ExecutionResult)
   155  		}
   156  	}
   157  
   158  	return r0
   159  }
   160  
   161  // ResultID provides a mock function with given fields:
   162  func (_m *AssignmentCollector) ResultID() flow.Identifier {
   163  	ret := _m.Called()
   164  
   165  	var r0 flow.Identifier
   166  	if rf, ok := ret.Get(0).(func() flow.Identifier); ok {
   167  		r0 = rf()
   168  	} else {
   169  		if ret.Get(0) != nil {
   170  			r0 = ret.Get(0).(flow.Identifier)
   171  		}
   172  	}
   173  
   174  	return r0
   175  }
   176  
   177  type mockConstructorTestingTNewAssignmentCollector interface {
   178  	mock.TestingT
   179  	Cleanup(func())
   180  }
   181  
   182  // NewAssignmentCollector creates a new instance of AssignmentCollector. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
   183  func NewAssignmentCollector(t mockConstructorTestingTNewAssignmentCollector) *AssignmentCollector {
   184  	mock := &AssignmentCollector{}
   185  	mock.Mock.Test(t)
   186  
   187  	t.Cleanup(func() { mock.AssertExpectations(t) })
   188  
   189  	return mock
   190  }