github.com/ewagmig/fabric@v2.1.1+incompatible/core/policy/mocks/identity_deserializer.go (about) 1 // Code generated by mockery v1.0.0. DO NOT EDIT. 2 3 package mocks 4 5 import fabric_protos_gomsp "github.com/hyperledger/fabric-protos-go/msp" 6 import mock "github.com/stretchr/testify/mock" 7 import msp "github.com/hyperledger/fabric/msp" 8 9 // IdentityDeserializer is an autogenerated mock type for the IdentityDeserializer type 10 type IdentityDeserializer struct { 11 mock.Mock 12 } 13 14 // DeserializeIdentity provides a mock function with given fields: serializedIdentity 15 func (_m *IdentityDeserializer) DeserializeIdentity(serializedIdentity []byte) (msp.Identity, error) { 16 ret := _m.Called(serializedIdentity) 17 18 var r0 msp.Identity 19 if rf, ok := ret.Get(0).(func([]byte) msp.Identity); ok { 20 r0 = rf(serializedIdentity) 21 } else { 22 if ret.Get(0) != nil { 23 r0 = ret.Get(0).(msp.Identity) 24 } 25 } 26 27 var r1 error 28 if rf, ok := ret.Get(1).(func([]byte) error); ok { 29 r1 = rf(serializedIdentity) 30 } else { 31 r1 = ret.Error(1) 32 } 33 34 return r0, r1 35 } 36 37 // IsWellFormed provides a mock function with given fields: identity 38 func (_m *IdentityDeserializer) IsWellFormed(identity *fabric_protos_gomsp.SerializedIdentity) error { 39 ret := _m.Called(identity) 40 41 var r0 error 42 if rf, ok := ret.Get(0).(func(*fabric_protos_gomsp.SerializedIdentity) error); ok { 43 r0 = rf(identity) 44 } else { 45 r0 = ret.Error(0) 46 } 47 48 return r0 49 }