use of org.apache.gobblin.converter.avro.JsonElementConversionFactory.MapConverter in project incubator-gobblin by apache.
the class JsonElementConversionFactoryTest method schemaWithMapOfArrays.
@Test
public void schemaWithMapOfArrays() throws Exception {
String testName = "schemaWithMapOfArrays";
JsonObject schema = getSchemaData(testName).getAsJsonObject();
JsonObject expected = getExpectedSchema(testName).getAsJsonObject();
MapConverter converter = new MapConverter(new JsonSchema(schema), state);
Assert.assertEquals(avroSchemaToJsonElement(converter), expected);
}
use of org.apache.gobblin.converter.avro.JsonElementConversionFactory.MapConverter in project incubator-gobblin by apache.
the class JsonElementConversionFactoryTest method schemaWithMap.
@Test
public void schemaWithMap() throws Exception {
String testName = "schemaWithMap";
JsonObject schema = getSchemaData(testName).getAsJsonObject();
JsonObject expected = getExpectedSchema(testName).getAsJsonObject();
MapConverter converter = new MapConverter(new JsonSchema(schema), state);
Assert.assertEquals(avroSchemaToJsonElement(converter), expected);
}
use of org.apache.gobblin.converter.avro.JsonElementConversionFactory.MapConverter in project incubator-gobblin by apache.
the class JsonElementConversionFactoryTest method schemaWithMapOfEnum.
@Test
public void schemaWithMapOfEnum() throws Exception {
String testName = "schemaWithMapOfEnum";
JsonObject schema = getSchemaData(testName).getAsJsonObject();
JsonObject expected = getExpectedSchema(testName).getAsJsonObject();
MapConverter converter = new MapConverter(new JsonSchema(schema), state);
Assert.assertEquals(avroSchemaToJsonElement(converter), expected);
}
use of org.apache.gobblin.converter.avro.JsonElementConversionFactory.MapConverter in project incubator-gobblin by apache.
the class JsonElementConversionFactoryTest method schemaWithMapIsNullable.
@Test
public void schemaWithMapIsNullable() throws Exception {
String testName = "schemaWithMapIsNullable";
JsonObject schema = getSchemaData(testName).getAsJsonObject();
JsonArray expected = getExpectedSchema(testName).getAsJsonArray();
MapConverter converter = new MapConverter(new JsonSchema(schema), state);
Assert.assertEquals(avroSchemaToJsonElement(converter), expected);
}
use of org.apache.gobblin.converter.avro.JsonElementConversionFactory.MapConverter in project incubator-gobblin by apache.
the class JsonElementConversionFactoryTest method schemaWithMapOfRecords.
@Test
public void schemaWithMapOfRecords() throws Exception {
String testName = "schemaWithMapOfRecords";
JsonObject schema = getSchemaData(testName).getAsJsonObject();
JsonObject expected = getExpectedSchema(testName).getAsJsonObject();
MapConverter converter = new MapConverter(new JsonSchema(schema), state);
Assert.assertEquals(avroSchemaToJsonElement(converter), expected);
}
Aggregations