github.com/anjalikarhana/fabric@v2.1.1+incompatible/core/handlers/validation/builtin/v20/mocks/state_based_validator.go (about) 1 // Code generated by mockery v1.0.0. DO NOT EDIT. 2 3 package mocks 4 5 import common "github.com/hyperledger/fabric-protos-go/common" 6 import errors "github.com/hyperledger/fabric/common/errors" 7 import mock "github.com/stretchr/testify/mock" 8 import peer "github.com/hyperledger/fabric-protos-go/peer" 9 10 // StateBasedValidator is an autogenerated mock type for the StateBasedValidator type 11 type StateBasedValidator struct { 12 mock.Mock 13 } 14 15 // PostValidate provides a mock function with given fields: cc, blockNum, txNum, err 16 func (_m *StateBasedValidator) PostValidate(cc string, blockNum uint64, txNum uint64, err error) { 17 _m.Called(cc, blockNum, txNum, err) 18 } 19 20 // PreValidate provides a mock function with given fields: txNum, block 21 func (_m *StateBasedValidator) PreValidate(txNum uint64, block *common.Block) { 22 _m.Called(txNum, block) 23 } 24 25 // Validate provides a mock function with given fields: cc, blockNum, txNum, rwset, prp, ep, endorsements 26 func (_m *StateBasedValidator) Validate(cc string, blockNum uint64, txNum uint64, rwset []byte, prp []byte, ep []byte, endorsements []*peer.Endorsement) errors.TxValidationError { 27 ret := _m.Called(cc, blockNum, txNum, rwset, prp, ep, endorsements) 28 29 var r0 errors.TxValidationError 30 if rf, ok := ret.Get(0).(func(string, uint64, uint64, []byte, []byte, []byte, []*peer.Endorsement) errors.TxValidationError); ok { 31 r0 = rf(cc, blockNum, txNum, rwset, prp, ep, endorsements) 32 } else { 33 if ret.Get(0) != nil { 34 r0 = ret.Get(0).(errors.TxValidationError) 35 } 36 } 37 38 return r0 39 }