ProtoDynamicMessageSchema implements Serializable { public Schema getSchema() { return context.getSchema(); } private  ProtoDynamicMessageSchema(String messageName, ProtoDomain domain); private  ProtoDynamicMessageSchema(Context context); static ProtoDynamicMessageSchema forDescriptor(ProtoDomain domain, String messageName); static ProtoDynamicMessageSchema<DynamicMessage> forDescriptor(
      ProtoDomain domain, Descriptors.Descriptor descriptor); Schema getSchema(); SerializableFunction<T, Row> getToRowFunction(); SerializableFunction<Row, T> getFromRowFunction(); static final long serialVersionUID; }
@Test public void testPrimitiveSchema() { ProtoDynamicMessageSchema schemaProvider = schemaFromDescriptor(Primitive.getDescriptor()); Schema schema = schemaProvider.getSchema(); assertEquals(PRIMITIVE_SCHEMA, schema); }
@Test public void testRepeatedSchema() { ProtoDynamicMessageSchema schemaProvider = schemaFromDescriptor(RepeatPrimitive.getDescriptor()); Schema schema = schemaProvider.getSchema(); assertEquals(REPEATED_SCHEMA, schema); }
@Test public void testMapSchema() { ProtoDynamicMessageSchema schemaProvider = schemaFromDescriptor(MapPrimitive.getDescriptor()); Schema schema = schemaProvider.getSchema(); assertEquals(MAP_PRIMITIVE_SCHEMA, schema); }
@Test public void testNestedSchema() { ProtoDynamicMessageSchema schemaProvider = schemaFromDescriptor(Nested.getDescriptor()); Schema schema = schemaProvider.getSchema(); assertEquals(NESTED_SCHEMA, schema); }
@Test public void testOneOfSchema() { ProtoDynamicMessageSchema schemaProvider = schemaFromDescriptor(OneOf.getDescriptor()); Schema schema = schemaProvider.getSchema(); assertEquals(ONEOF_SCHEMA, schema); }
@Test public void testOuterOneOfSchema() { ProtoDynamicMessageSchema schemaProvider = schemaFromDescriptor(OuterOneOf.getDescriptor()); Schema schema = schemaProvider.getSchema(); assertEquals(OUTER_ONEOF_SCHEMA, schema); }
@Test public void testEnumSchema() { ProtoDynamicMessageSchema schemaProvider = schemaFromDescriptor(EnumMessage.getDescriptor()); Schema schema = schemaProvider.getSchema(); assertEquals(ENUM_SCHEMA, schema); }
@Test public void testWktMessageSchema() { ProtoDynamicMessageSchema schemaProvider = schemaFromDescriptor(WktMessage.getDescriptor()); Schema schema = schemaProvider.getSchema(); assertEquals(WKT_MESSAGE_SCHEMA, schema); }