hyperledger / fabric-admin-sdk

Hyperledger Fabric admin SDK
Apache License 2.0
31 stars 19 forks source link

Simplify protobuf assignment in unit tests #143

Closed bestbeforetoday closed 1 year ago

bestbeforetoday commented 1 year ago

Since protobuf messages cannot be shallow copied, serialization was previously used to assign the state of an expected protobuf to a gRPC service response parameter when mocking gRPC service invocations. This can be replaced by using the proto.Merge() utility function, which achieves the same result without the overhead of serialization.