Skip to content

Commit

Permalink
[core] Sonar - increase coverage.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmvk authored and LesTR committed Oct 22, 2021
1 parent 76200bd commit 262fee7
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,8 @@ public void testCreateProtoWhereRepeatedFieldChangedToOptional() {
public void testFieldAccessors() {
final StructureValueAccessor<ValueSchemeMessage> accessor =
new ProtoMessageValueAccessor<>(ValueSchemeMessage::getDefaultInstance);
final InnerMessage innerMessage = InnerMessage.newBuilder().setInnerDoubleType(1.2).build();
final InnerMessage innerMessage =
InnerMessage.newBuilder().setInnerEnum(Directions.LEFT).setInnerDoubleType(1.2).build();
final ValueSchemeMessage message =
ValueSchemeMessage.newBuilder()
.setStringType("test string")
Expand All @@ -261,6 +262,7 @@ public void testFieldAccessors() {
(StructureValueAccessor<InnerMessage>) accessor.getFieldAccessor("inner_message");
assertEquals(
1.2d, innerMessageAccessor.getRawFieldValue("inner_double_type", innerMessage), 0.0);
assertEquals("LEFT", innerMessageAccessor.getRawFieldValue("inner_enum", innerMessage));

// Test string type accessor.
@SuppressWarnings("unchecked")
Expand Down

0 comments on commit 262fee7

Please sign in to comment.