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

     1  // Code generated by mockery v2.21.4. DO NOT EDIT.
     2  
     3  package mock
     4  
     5  import (
     6  	crypto "github.com/onflow/crypto"
     7  	flow "github.com/onflow/flow-go/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  	var r1 error
    39  	if rf, ok := ret.Get(0).(func(flow.Identifier) (uint, error)); ok {
    40  		return rf(nodeID)
    41  	}
    42  	if rf, ok := ret.Get(0).(func(flow.Identifier) uint); ok {
    43  		r0 = rf(nodeID)
    44  	} else {
    45  		r0 = ret.Get(0).(uint)
    46  	}
    47  
    48  	if rf, ok := ret.Get(1).(func(flow.Identifier) error); ok {
    49  		r1 = rf(nodeID)
    50  	} else {
    51  		r1 = ret.Error(1)
    52  	}
    53  
    54  	return r0, r1
    55  }
    56  
    57  // KeyShare provides a mock function with given fields: nodeID
    58  func (_m *DKG) KeyShare(nodeID flow.Identifier) (crypto.PublicKey, error) {
    59  	ret := _m.Called(nodeID)
    60  
    61  	var r0 crypto.PublicKey
    62  	var r1 error
    63  	if rf, ok := ret.Get(0).(func(flow.Identifier) (crypto.PublicKey, error)); ok {
    64  		return rf(nodeID)
    65  	}
    66  	if rf, ok := ret.Get(0).(func(flow.Identifier) crypto.PublicKey); ok {
    67  		r0 = rf(nodeID)
    68  	} else {
    69  		if ret.Get(0) != nil {
    70  			r0 = ret.Get(0).(crypto.PublicKey)
    71  		}
    72  	}
    73  
    74  	if rf, ok := ret.Get(1).(func(flow.Identifier) error); ok {
    75  		r1 = rf(nodeID)
    76  	} else {
    77  		r1 = ret.Error(1)
    78  	}
    79  
    80  	return r0, r1
    81  }
    82  
    83  // Size provides a mock function with given fields:
    84  func (_m *DKG) Size() uint {
    85  	ret := _m.Called()
    86  
    87  	var r0 uint
    88  	if rf, ok := ret.Get(0).(func() uint); ok {
    89  		r0 = rf()
    90  	} else {
    91  		r0 = ret.Get(0).(uint)
    92  	}
    93  
    94  	return r0
    95  }
    96  
    97  type mockConstructorTestingTNewDKG interface {
    98  	mock.TestingT
    99  	Cleanup(func())
   100  }
   101  
   102  // 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.
   103  func NewDKG(t mockConstructorTestingTNewDKG) *DKG {
   104  	mock := &DKG{}
   105  	mock.Mock.Test(t)
   106  
   107  	t.Cleanup(func() { mock.AssertExpectations(t) })
   108  
   109  	return mock
   110  }