github.com/Hnampk/my-fabric@v0.0.0-20201028083322-75069da399c0/core/handlers/validation/builtin/mocks/transaction_validator.go (about) 1 // Code generated by mockery v1.0.0. DO NOT EDIT. 2 3 package mocks 4 5 import ( 6 common "github.com/hyperledger/fabric-protos-go/common" 7 errors "github.com/hyperledger/fabric/common/errors" 8 9 mock "github.com/stretchr/testify/mock" 10 ) 11 12 // TransactionValidator is an autogenerated mock type for the TransactionValidator type 13 type TransactionValidator struct { 14 mock.Mock 15 } 16 17 // Validate provides a mock function with given fields: block, namespace, txPosition, actionPosition, policy 18 func (_m *TransactionValidator) Validate(block *common.Block, namespace string, txPosition int, actionPosition int, policy []byte) errors.TxValidationError { 19 ret := _m.Called(block, namespace, txPosition, actionPosition, policy) 20 21 var r0 errors.TxValidationError 22 if rf, ok := ret.Get(0).(func(*common.Block, string, int, int, []byte) errors.TxValidationError); ok { 23 r0 = rf(block, namespace, txPosition, actionPosition, policy) 24 } else { 25 if ret.Get(0) != nil { 26 r0 = ret.Get(0).(errors.TxValidationError) 27 } 28 } 29 30 return r0 31 }