github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/storage/mock/quorum_certificates.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  	transaction "github.com/onflow/flow-go/storage/badger/transaction"
    10  )
    11  
    12  // QuorumCertificates is an autogenerated mock type for the QuorumCertificates type
    13  type QuorumCertificates struct {
    14  	mock.Mock
    15  }
    16  
    17  // ByBlockID provides a mock function with given fields: blockID
    18  func (_m *QuorumCertificates) ByBlockID(blockID flow.Identifier) (*flow.QuorumCertificate, error) {
    19  	ret := _m.Called(blockID)
    20  
    21  	var r0 *flow.QuorumCertificate
    22  	var r1 error
    23  	if rf, ok := ret.Get(0).(func(flow.Identifier) (*flow.QuorumCertificate, error)); ok {
    24  		return rf(blockID)
    25  	}
    26  	if rf, ok := ret.Get(0).(func(flow.Identifier) *flow.QuorumCertificate); ok {
    27  		r0 = rf(blockID)
    28  	} else {
    29  		if ret.Get(0) != nil {
    30  			r0 = ret.Get(0).(*flow.QuorumCertificate)
    31  		}
    32  	}
    33  
    34  	if rf, ok := ret.Get(1).(func(flow.Identifier) error); ok {
    35  		r1 = rf(blockID)
    36  	} else {
    37  		r1 = ret.Error(1)
    38  	}
    39  
    40  	return r0, r1
    41  }
    42  
    43  // StoreTx provides a mock function with given fields: qc
    44  func (_m *QuorumCertificates) StoreTx(qc *flow.QuorumCertificate) func(*transaction.Tx) error {
    45  	ret := _m.Called(qc)
    46  
    47  	var r0 func(*transaction.Tx) error
    48  	if rf, ok := ret.Get(0).(func(*flow.QuorumCertificate) func(*transaction.Tx) error); ok {
    49  		r0 = rf(qc)
    50  	} else {
    51  		if ret.Get(0) != nil {
    52  			r0 = ret.Get(0).(func(*transaction.Tx) error)
    53  		}
    54  	}
    55  
    56  	return r0
    57  }
    58  
    59  type mockConstructorTestingTNewQuorumCertificates interface {
    60  	mock.TestingT
    61  	Cleanup(func())
    62  }
    63  
    64  // NewQuorumCertificates creates a new instance of QuorumCertificates. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    65  func NewQuorumCertificates(t mockConstructorTestingTNewQuorumCertificates) *QuorumCertificates {
    66  	mock := &QuorumCertificates{}
    67  	mock.Mock.Test(t)
    68  
    69  	t.Cleanup(func() { mock.AssertExpectations(t) })
    70  
    71  	return mock
    72  }