github.com/iotexproject/iotex-core@v1.14.1-rc1/action/protocol/staking/contractstake_indexer_mock.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: ./action/protocol/staking/contractstake_indexer.go 3 4 // Package staking is a generated GoMock package. 5 package staking 6 7 import ( 8 context "context" 9 big "math/big" 10 reflect "reflect" 11 12 gomock "github.com/golang/mock/gomock" 13 address "github.com/iotexproject/iotex-address/address" 14 ) 15 16 // MockContractStakingIndexer is a mock of ContractStakingIndexer interface. 17 type MockContractStakingIndexer struct { 18 ctrl *gomock.Controller 19 recorder *MockContractStakingIndexerMockRecorder 20 } 21 22 // MockContractStakingIndexerMockRecorder is the mock recorder for MockContractStakingIndexer. 23 type MockContractStakingIndexerMockRecorder struct { 24 mock *MockContractStakingIndexer 25 } 26 27 // NewMockContractStakingIndexer creates a new mock instance. 28 func NewMockContractStakingIndexer(ctrl *gomock.Controller) *MockContractStakingIndexer { 29 mock := &MockContractStakingIndexer{ctrl: ctrl} 30 mock.recorder = &MockContractStakingIndexerMockRecorder{mock} 31 return mock 32 } 33 34 // EXPECT returns an object that allows the caller to indicate expected use. 35 func (m *MockContractStakingIndexer) EXPECT() *MockContractStakingIndexerMockRecorder { 36 return m.recorder 37 } 38 39 // BucketTypes mocks base method. 40 func (m *MockContractStakingIndexer) BucketTypes(height uint64) ([]*ContractStakingBucketType, error) { 41 m.ctrl.T.Helper() 42 ret := m.ctrl.Call(m, "BucketTypes", height) 43 ret0, _ := ret[0].([]*ContractStakingBucketType) 44 ret1, _ := ret[1].(error) 45 return ret0, ret1 46 } 47 48 // BucketTypes indicates an expected call of BucketTypes. 49 func (mr *MockContractStakingIndexerMockRecorder) BucketTypes(height interface{}) *gomock.Call { 50 mr.mock.ctrl.T.Helper() 51 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BucketTypes", reflect.TypeOf((*MockContractStakingIndexer)(nil).BucketTypes), height) 52 } 53 54 // Buckets mocks base method. 55 func (m *MockContractStakingIndexer) Buckets(height uint64) ([]*VoteBucket, error) { 56 m.ctrl.T.Helper() 57 ret := m.ctrl.Call(m, "Buckets", height) 58 ret0, _ := ret[0].([]*VoteBucket) 59 ret1, _ := ret[1].(error) 60 return ret0, ret1 61 } 62 63 // Buckets indicates an expected call of Buckets. 64 func (mr *MockContractStakingIndexerMockRecorder) Buckets(height interface{}) *gomock.Call { 65 mr.mock.ctrl.T.Helper() 66 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Buckets", reflect.TypeOf((*MockContractStakingIndexer)(nil).Buckets), height) 67 } 68 69 // BucketsByCandidate mocks base method. 70 func (m *MockContractStakingIndexer) BucketsByCandidate(ownerAddr address.Address, height uint64) ([]*VoteBucket, error) { 71 m.ctrl.T.Helper() 72 ret := m.ctrl.Call(m, "BucketsByCandidate", ownerAddr, height) 73 ret0, _ := ret[0].([]*VoteBucket) 74 ret1, _ := ret[1].(error) 75 return ret0, ret1 76 } 77 78 // BucketsByCandidate indicates an expected call of BucketsByCandidate. 79 func (mr *MockContractStakingIndexerMockRecorder) BucketsByCandidate(ownerAddr, height interface{}) *gomock.Call { 80 mr.mock.ctrl.T.Helper() 81 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BucketsByCandidate", reflect.TypeOf((*MockContractStakingIndexer)(nil).BucketsByCandidate), ownerAddr, height) 82 } 83 84 // BucketsByIndices mocks base method. 85 func (m *MockContractStakingIndexer) BucketsByIndices(arg0 []uint64, arg1 uint64) ([]*VoteBucket, error) { 86 m.ctrl.T.Helper() 87 ret := m.ctrl.Call(m, "BucketsByIndices", arg0, arg1) 88 ret0, _ := ret[0].([]*VoteBucket) 89 ret1, _ := ret[1].(error) 90 return ret0, ret1 91 } 92 93 // BucketsByIndices indicates an expected call of BucketsByIndices. 94 func (mr *MockContractStakingIndexerMockRecorder) BucketsByIndices(arg0, arg1 interface{}) *gomock.Call { 95 mr.mock.ctrl.T.Helper() 96 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BucketsByIndices", reflect.TypeOf((*MockContractStakingIndexer)(nil).BucketsByIndices), arg0, arg1) 97 } 98 99 // CandidateVotes mocks base method. 100 func (m *MockContractStakingIndexer) CandidateVotes(ctx context.Context, ownerAddr address.Address, height uint64) (*big.Int, error) { 101 m.ctrl.T.Helper() 102 ret := m.ctrl.Call(m, "CandidateVotes", ctx, ownerAddr, height) 103 ret0, _ := ret[0].(*big.Int) 104 ret1, _ := ret[1].(error) 105 return ret0, ret1 106 } 107 108 // CandidateVotes indicates an expected call of CandidateVotes. 109 func (mr *MockContractStakingIndexerMockRecorder) CandidateVotes(ctx, ownerAddr, height interface{}) *gomock.Call { 110 mr.mock.ctrl.T.Helper() 111 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CandidateVotes", reflect.TypeOf((*MockContractStakingIndexer)(nil).CandidateVotes), ctx, ownerAddr, height) 112 } 113 114 // TotalBucketCount mocks base method. 115 func (m *MockContractStakingIndexer) TotalBucketCount(height uint64) (uint64, error) { 116 m.ctrl.T.Helper() 117 ret := m.ctrl.Call(m, "TotalBucketCount", height) 118 ret0, _ := ret[0].(uint64) 119 ret1, _ := ret[1].(error) 120 return ret0, ret1 121 } 122 123 // TotalBucketCount indicates an expected call of TotalBucketCount. 124 func (mr *MockContractStakingIndexerMockRecorder) TotalBucketCount(height interface{}) *gomock.Call { 125 mr.mock.ctrl.T.Helper() 126 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TotalBucketCount", reflect.TypeOf((*MockContractStakingIndexer)(nil).TotalBucketCount), height) 127 }