use of org.infinispan.protostream.descriptors.FieldDescriptor in project protostream by infinispan.
the class DescriptorsTest method assertSearchResponse.
private void assertSearchResponse(Descriptor descriptor) {
assertThat(descriptor.getName()).isEqualTo("SearchResponse");
assertThat(descriptor.getFullName()).isEqualTo("org.infinispan.protostream.test.SearchResponse");
assertThat(descriptor.getFields()).hasSize(3);
assertThat(descriptor.getEnumTypes()).isEmpty();
FieldDescriptor resultField = descriptor.getFields().get(0);
assertThat(resultField.getName()).isEqualTo("result");
assertThat(resultField.getType()).isEqualTo(Type.MESSAGE);
FieldDescriptor baseField = descriptor.getFields().get(1);
assertThat(baseField.getName()).isEqualTo("base");
assertThat(baseField.getType()).isEqualTo(Type.MESSAGE);
}
Aggregations