github.com/ewagmig/fabric@v2.1.1+incompatible/core/policy/mocks/signature_policy_provider.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 mock "github.com/stretchr/testify/mock"
     7  import policies "github.com/hyperledger/fabric/common/policies"
     8  
     9  // SignaturePolicyProvider is an autogenerated mock type for the SignaturePolicyProvider type
    10  type SignaturePolicyProvider struct {
    11  	mock.Mock
    12  }
    13  
    14  // NewPolicy provides a mock function with given fields: signaturePolicy
    15  func (_m *SignaturePolicyProvider) NewPolicy(signaturePolicy *common.SignaturePolicyEnvelope) (policies.Policy, error) {
    16  	ret := _m.Called(signaturePolicy)
    17  
    18  	var r0 policies.Policy
    19  	if rf, ok := ret.Get(0).(func(*common.SignaturePolicyEnvelope) policies.Policy); ok {
    20  		r0 = rf(signaturePolicy)
    21  	} else {
    22  		if ret.Get(0) != nil {
    23  			r0 = ret.Get(0).(policies.Policy)
    24  		}
    25  	}
    26  
    27  	var r1 error
    28  	if rf, ok := ret.Get(1).(func(*common.SignaturePolicyEnvelope) error); ok {
    29  		r1 = rf(signaturePolicy)
    30  	} else {
    31  		r1 = ret.Error(1)
    32  	}
    33  
    34  	return r0, r1
    35  }