github.com/koko1123/flow-go-1@v0.29.6/consensus/hotstuff/mocks/random_beacon_inspector.go (about)

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