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

     1  // Code generated by mockery v2.13.1. DO NOT EDIT.
     2  
     3  package mocks
     4  
     5  import (
     6  	hotstuff "github.com/koko1123/flow-go-1/consensus/hotstuff"
     7  	flow "github.com/koko1123/flow-go-1/model/flow"
     8  
     9  	mock "github.com/stretchr/testify/mock"
    10  )
    11  
    12  // Committee is an autogenerated mock type for the Committee type
    13  type Committee struct {
    14  	mock.Mock
    15  }
    16  
    17  // DKG provides a mock function with given fields: blockID
    18  func (_m *Committee) DKG(blockID flow.Identifier) (hotstuff.DKG, error) {
    19  	ret := _m.Called(blockID)
    20  
    21  	var r0 hotstuff.DKG
    22  	if rf, ok := ret.Get(0).(func(flow.Identifier) hotstuff.DKG); ok {
    23  		r0 = rf(blockID)
    24  	} else {
    25  		if ret.Get(0) != nil {
    26  			r0 = ret.Get(0).(hotstuff.DKG)
    27  		}
    28  	}
    29  
    30  	var r1 error
    31  	if rf, ok := ret.Get(1).(func(flow.Identifier) error); ok {
    32  		r1 = rf(blockID)
    33  	} else {
    34  		r1 = ret.Error(1)
    35  	}
    36  
    37  	return r0, r1
    38  }
    39  
    40  // Identities provides a mock function with given fields: blockID
    41  func (_m *Committee) Identities(blockID flow.Identifier) (flow.IdentityList, error) {
    42  	ret := _m.Called(blockID)
    43  
    44  	var r0 flow.IdentityList
    45  	if rf, ok := ret.Get(0).(func(flow.Identifier) flow.IdentityList); ok {
    46  		r0 = rf(blockID)
    47  	} else {
    48  		if ret.Get(0) != nil {
    49  			r0 = ret.Get(0).(flow.IdentityList)
    50  		}
    51  	}
    52  
    53  	var r1 error
    54  	if rf, ok := ret.Get(1).(func(flow.Identifier) error); ok {
    55  		r1 = rf(blockID)
    56  	} else {
    57  		r1 = ret.Error(1)
    58  	}
    59  
    60  	return r0, r1
    61  }
    62  
    63  // Identity provides a mock function with given fields: blockID, participantID
    64  func (_m *Committee) Identity(blockID flow.Identifier, participantID flow.Identifier) (*flow.Identity, error) {
    65  	ret := _m.Called(blockID, participantID)
    66  
    67  	var r0 *flow.Identity
    68  	if rf, ok := ret.Get(0).(func(flow.Identifier, flow.Identifier) *flow.Identity); ok {
    69  		r0 = rf(blockID, participantID)
    70  	} else {
    71  		if ret.Get(0) != nil {
    72  			r0 = ret.Get(0).(*flow.Identity)
    73  		}
    74  	}
    75  
    76  	var r1 error
    77  	if rf, ok := ret.Get(1).(func(flow.Identifier, flow.Identifier) error); ok {
    78  		r1 = rf(blockID, participantID)
    79  	} else {
    80  		r1 = ret.Error(1)
    81  	}
    82  
    83  	return r0, r1
    84  }
    85  
    86  // LeaderForView provides a mock function with given fields: view
    87  func (_m *Committee) LeaderForView(view uint64) (flow.Identifier, error) {
    88  	ret := _m.Called(view)
    89  
    90  	var r0 flow.Identifier
    91  	if rf, ok := ret.Get(0).(func(uint64) flow.Identifier); ok {
    92  		r0 = rf(view)
    93  	} else {
    94  		if ret.Get(0) != nil {
    95  			r0 = ret.Get(0).(flow.Identifier)
    96  		}
    97  	}
    98  
    99  	var r1 error
   100  	if rf, ok := ret.Get(1).(func(uint64) error); ok {
   101  		r1 = rf(view)
   102  	} else {
   103  		r1 = ret.Error(1)
   104  	}
   105  
   106  	return r0, r1
   107  }
   108  
   109  // Self provides a mock function with given fields:
   110  func (_m *Committee) Self() flow.Identifier {
   111  	ret := _m.Called()
   112  
   113  	var r0 flow.Identifier
   114  	if rf, ok := ret.Get(0).(func() flow.Identifier); ok {
   115  		r0 = rf()
   116  	} else {
   117  		if ret.Get(0) != nil {
   118  			r0 = ret.Get(0).(flow.Identifier)
   119  		}
   120  	}
   121  
   122  	return r0
   123  }
   124  
   125  type mockConstructorTestingTNewCommittee interface {
   126  	mock.TestingT
   127  	Cleanup(func())
   128  }
   129  
   130  // NewCommittee creates a new instance of Committee. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
   131  func NewCommittee(t mockConstructorTestingTNewCommittee) *Committee {
   132  	mock := &Committee{}
   133  	mock.Mock.Test(t)
   134  
   135  	t.Cleanup(func() { mock.AssertExpectations(t) })
   136  
   137  	return mock
   138  }