|
|
@ -1195,7 +1195,7 @@ abstract public class BaseEdgeTest extends AbstractControllerTest { |
|
|
Assert.assertEquals(ruleChainMetadataUpdateMsg.getRuleChainIdMSB(), edgeRootRuleChainId.getId().getMostSignificantBits()); |
|
|
Assert.assertEquals(ruleChainMetadataUpdateMsg.getRuleChainIdMSB(), edgeRootRuleChainId.getId().getMostSignificantBits()); |
|
|
Assert.assertEquals(ruleChainMetadataUpdateMsg.getRuleChainIdLSB(), edgeRootRuleChainId.getId().getLeastSignificantBits()); |
|
|
Assert.assertEquals(ruleChainMetadataUpdateMsg.getRuleChainIdLSB(), edgeRootRuleChainId.getId().getLeastSignificantBits()); |
|
|
|
|
|
|
|
|
testAutoGeneratedCodeByProtobuf(ruleChainMetadataRequestMsg); |
|
|
testAutoGeneratedCodeByProtobuf(ruleChainMetadataUpdateMsg); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private void sendUserCredentialsRequest() throws Exception { |
|
|
private void sendUserCredentialsRequest() throws Exception { |
|
|
@ -1390,9 +1390,16 @@ abstract public class BaseEdgeTest extends AbstractControllerTest { |
|
|
|
|
|
|
|
|
private void testAutoGeneratedCodeByProtobuf(MessageLite.Builder builder) throws InvalidProtocolBufferException { |
|
|
private void testAutoGeneratedCodeByProtobuf(MessageLite.Builder builder) throws InvalidProtocolBufferException { |
|
|
MessageLite source = builder.build(); |
|
|
MessageLite source = builder.build(); |
|
|
|
|
|
|
|
|
|
|
|
testAutoGeneratedCodeByProtobuf(source); |
|
|
|
|
|
|
|
|
|
|
|
MessageLite target = source.getParserForType().parseFrom(source.toByteArray()); |
|
|
|
|
|
builder.clear().mergeFrom(target); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void testAutoGeneratedCodeByProtobuf(MessageLite source) throws InvalidProtocolBufferException { |
|
|
MessageLite target = source.getParserForType().parseFrom(source.toByteArray()); |
|
|
MessageLite target = source.getParserForType().parseFrom(source.toByteArray()); |
|
|
Assert.assertEquals(source, target); |
|
|
Assert.assertEquals(source, target); |
|
|
Assert.assertEquals(source.hashCode(), target.hashCode()); |
|
|
Assert.assertEquals(source.hashCode(), target.hashCode()); |
|
|
builder.clear().mergeFrom(target); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|