github.com/hechain20/hechain@v0.0.0-20220316014945-b544036ba106/core/committer/txvalidator/v20/mocks/dispatcher.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  	mock "github.com/stretchr/testify/mock"
     8  
     9  	peer "github.com/hyperledger/fabric-protos-go/peer"
    10  )
    11  
    12  // Dispatcher is an autogenerated mock type for the Dispatcher type
    13  type Dispatcher struct {
    14  	mock.Mock
    15  }
    16  
    17  // Dispatch provides a mock function with given fields: seq, payload, envBytes, block
    18  func (_m *Dispatcher) Dispatch(seq int, payload *common.Payload, envBytes []byte, block *common.Block) (peer.TxValidationCode, error) {
    19  	ret := _m.Called(seq, payload, envBytes, block)
    20  
    21  	var r0 peer.TxValidationCode
    22  	if rf, ok := ret.Get(0).(func(int, *common.Payload, []byte, *common.Block) peer.TxValidationCode); ok {
    23  		r0 = rf(seq, payload, envBytes, block)
    24  	} else {
    25  		r0 = ret.Get(1).(peer.TxValidationCode)
    26  	}
    27  
    28  	var r1 error
    29  	if rf, ok := ret.Get(1).(func(int, *common.Payload, []byte, *common.Block) error); ok {
    30  		r1 = rf(seq, payload, envBytes, block)
    31  	} else {
    32  		r1 = ret.Error(0)
    33  	}
    34  
    35  	return r0, r1
    36  }