Search in sources :

Example 1 with ExtendDescriptor

use of org.infinispan.protostream.descriptors.ExtendDescriptor in project protostream by infinispan.

the class DescriptorsTest method assertExtensions.

private void assertExtensions(List<ExtendDescriptor> extensions) {
    assertThat(extensions).hasSize(1);
    ExtendDescriptor resultExtension = extensions.get(0);
    assertThat(resultExtension.getExtendedMessage().getName()).isEqualTo("MoreInner");
    assertThat(resultExtension.getFileDescriptor()).isNotNull();
    FieldDescriptor barField = resultExtension.getFields().get(0);
    assertThat(barField.getLabel()).isEqualTo(Label.OPTIONAL);
    assertThat(barField.getJavaType()).isEqualTo(JavaType.FLOAT);
    assertThat(barField.getNumber()).isEqualTo(101);
    assertThat(barField.isPacked()).isTrue();
}
Also used : ExtendDescriptor(org.infinispan.protostream.descriptors.ExtendDescriptor) FieldDescriptor(org.infinispan.protostream.descriptors.FieldDescriptor)

Aggregations

ExtendDescriptor (org.infinispan.protostream.descriptors.ExtendDescriptor)1 FieldDescriptor (org.infinispan.protostream.descriptors.FieldDescriptor)1