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

     1  // Code generated by mockery v2.21.4. DO NOT EDIT.
     2  
     3  package mock
     4  
     5  import (
     6  	flow "github.com/onflow/flow-go/model/flow"
     7  	mock "github.com/stretchr/testify/mock"
     8  )
     9  
    10  // ResultApprovals is an autogenerated mock type for the ResultApprovals type
    11  type ResultApprovals struct {
    12  	mock.Mock
    13  }
    14  
    15  // ByChunk provides a mock function with given fields: resultID, chunkIndex
    16  func (_m *ResultApprovals) ByChunk(resultID flow.Identifier, chunkIndex uint64) (*flow.ResultApproval, error) {
    17  	ret := _m.Called(resultID, chunkIndex)
    18  
    19  	var r0 *flow.ResultApproval
    20  	var r1 error
    21  	if rf, ok := ret.Get(0).(func(flow.Identifier, uint64) (*flow.ResultApproval, error)); ok {
    22  		return rf(resultID, chunkIndex)
    23  	}
    24  	if rf, ok := ret.Get(0).(func(flow.Identifier, uint64) *flow.ResultApproval); ok {
    25  		r0 = rf(resultID, chunkIndex)
    26  	} else {
    27  		if ret.Get(0) != nil {
    28  			r0 = ret.Get(0).(*flow.ResultApproval)
    29  		}
    30  	}
    31  
    32  	if rf, ok := ret.Get(1).(func(flow.Identifier, uint64) error); ok {
    33  		r1 = rf(resultID, chunkIndex)
    34  	} else {
    35  		r1 = ret.Error(1)
    36  	}
    37  
    38  	return r0, r1
    39  }
    40  
    41  // ByID provides a mock function with given fields: approvalID
    42  func (_m *ResultApprovals) ByID(approvalID flow.Identifier) (*flow.ResultApproval, error) {
    43  	ret := _m.Called(approvalID)
    44  
    45  	var r0 *flow.ResultApproval
    46  	var r1 error
    47  	if rf, ok := ret.Get(0).(func(flow.Identifier) (*flow.ResultApproval, error)); ok {
    48  		return rf(approvalID)
    49  	}
    50  	if rf, ok := ret.Get(0).(func(flow.Identifier) *flow.ResultApproval); ok {
    51  		r0 = rf(approvalID)
    52  	} else {
    53  		if ret.Get(0) != nil {
    54  			r0 = ret.Get(0).(*flow.ResultApproval)
    55  		}
    56  	}
    57  
    58  	if rf, ok := ret.Get(1).(func(flow.Identifier) error); ok {
    59  		r1 = rf(approvalID)
    60  	} else {
    61  		r1 = ret.Error(1)
    62  	}
    63  
    64  	return r0, r1
    65  }
    66  
    67  // Index provides a mock function with given fields: resultID, chunkIndex, approvalID
    68  func (_m *ResultApprovals) Index(resultID flow.Identifier, chunkIndex uint64, approvalID flow.Identifier) error {
    69  	ret := _m.Called(resultID, chunkIndex, approvalID)
    70  
    71  	var r0 error
    72  	if rf, ok := ret.Get(0).(func(flow.Identifier, uint64, flow.Identifier) error); ok {
    73  		r0 = rf(resultID, chunkIndex, approvalID)
    74  	} else {
    75  		r0 = ret.Error(0)
    76  	}
    77  
    78  	return r0
    79  }
    80  
    81  // Store provides a mock function with given fields: result
    82  func (_m *ResultApprovals) Store(result *flow.ResultApproval) error {
    83  	ret := _m.Called(result)
    84  
    85  	var r0 error
    86  	if rf, ok := ret.Get(0).(func(*flow.ResultApproval) error); ok {
    87  		r0 = rf(result)
    88  	} else {
    89  		r0 = ret.Error(0)
    90  	}
    91  
    92  	return r0
    93  }
    94  
    95  type mockConstructorTestingTNewResultApprovals interface {
    96  	mock.TestingT
    97  	Cleanup(func())
    98  }
    99  
   100  // NewResultApprovals creates a new instance of ResultApprovals. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
   101  func NewResultApprovals(t mockConstructorTestingTNewResultApprovals) *ResultApprovals {
   102  	mock := &ResultApprovals{}
   103  	mock.Mock.Test(t)
   104  
   105  	t.Cleanup(func() { mock.AssertExpectations(t) })
   106  
   107  	return mock
   108  }