github.com/koko1123/flow-go-1@v0.29.6/consensus/hotstuff/mocks/dkg.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  	flow "github.com/koko1123/flow-go-1/model/flow"
     8  
     9  	mock "github.com/stretchr/testify/mock"
    10  )
    11  
    12  // DKG is an autogenerated mock type for the DKG type
    13  type DKG struct {
    14  	mock.Mock
    15  }
    16  
    17  // GroupKey provides a mock function with given fields:
    18  func (_m *DKG) GroupKey() crypto.PublicKey {
    19  	ret := _m.Called()
    20  
    21  	var r0 crypto.PublicKey
    22  	if rf, ok := ret.Get(0).(func() crypto.PublicKey); ok {
    23  		r0 = rf()
    24  	} else {
    25  		if ret.Get(0) != nil {
    26  			r0 = ret.Get(0).(crypto.PublicKey)
    27  		}
    28  	}
    29  
    30  	return r0
    31  }
    32  
    33  // Index provides a mock function with given fields: nodeID
    34  func (_m *DKG) Index(nodeID flow.Identifier) (uint, error) {
    35  	ret := _m.Called(nodeID)
    36  
    37  	var r0 uint
    38  	if rf, ok := ret.Get(0).(func(flow.Identifier) uint); ok {
    39  		r0 = rf(nodeID)
    40  	} else {
    41  		r0 = ret.Get(0).(uint)
    42  	}
    43  
    44  	var r1 error
    45  	if rf, ok := ret.Get(1).(func(flow.Identifier) error); ok {
    46  		r1 = rf(nodeID)
    47  	} else {
    48  		r1 = ret.Error(1)
    49  	}
    50  
    51  	return r0, r1
    52  }
    53  
    54  // KeyShare provides a mock function with given fields: nodeID
    55  func (_m *DKG) KeyShare(nodeID flow.Identifier) (crypto.PublicKey, error) {
    56  	ret := _m.Called(nodeID)
    57  
    58  	var r0 crypto.PublicKey
    59  	if rf, ok := ret.Get(0).(func(flow.Identifier) crypto.PublicKey); ok {
    60  		r0 = rf(nodeID)
    61  	} else {
    62  		if ret.Get(0) != nil {
    63  			r0 = ret.Get(0).(crypto.PublicKey)
    64  		}
    65  	}
    66  
    67  	var r1 error
    68  	if rf, ok := ret.Get(1).(func(flow.Identifier) error); ok {
    69  		r1 = rf(nodeID)
    70  	} else {
    71  		r1 = ret.Error(1)
    72  	}
    73  
    74  	return r0, r1
    75  }
    76  
    77  // Size provides a mock function with given fields:
    78  func (_m *DKG) Size() uint {
    79  	ret := _m.Called()
    80  
    81  	var r0 uint
    82  	if rf, ok := ret.Get(0).(func() uint); ok {
    83  		r0 = rf()
    84  	} else {
    85  		r0 = ret.Get(0).(uint)
    86  	}
    87  
    88  	return r0
    89  }
    90  
    91  type mockConstructorTestingTNewDKG interface {
    92  	mock.TestingT
    93  	Cleanup(func())
    94  }
    95  
    96  // NewDKG creates a new instance of DKG. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    97  func NewDKG(t mockConstructorTestingTNewDKG) *DKG {
    98  	mock := &DKG{}
    99  	mock.Mock.Test(t)
   100  
   101  	t.Cleanup(func() { mock.AssertExpectations(t) })
   102  
   103  	return mock
   104  }