use of org.apache.pulsar.client.impl.schema.SchemaTestUtils.FooV2 in project pulsar by apache.
the class GenericAvroReaderTest method setup.
@BeforeMethod
public void setup() {
fooSchema = AvroSchema.of(Foo.class);
fooV2Schema = AvroSchema.of(FooV2.class);
fooSchemaNotNull = AvroSchema.of(SchemaDefinition.builder().withAlwaysAllowNull(false).withPojo(Foo.class).build());
fooOffsetSchema = AvroSchema.of(Foo.class);
fooOffsetSchema.getAvroSchema().addProp(GenericAvroSchema.OFFSET_PROP, 5);
foo = new Foo();
foo.setField1("foo1");
foo.setField2("bar1");
foo.setField4(new SchemaTestUtils.Bar());
foo.setFieldUnableNull("notNull");
fooV2 = new FooV2();
fooV2.setField1("foo1");
fooV2.setField3(10);
}
use of org.apache.pulsar.client.impl.schema.SchemaTestUtils.FooV2 in project pulsar by yahoo.
the class GenericAvroReaderTest method setup.
@BeforeMethod
public void setup() {
fooSchema = AvroSchema.of(Foo.class);
fooV2Schema = AvroSchema.of(FooV2.class);
fooSchemaNotNull = AvroSchema.of(SchemaDefinition.builder().withAlwaysAllowNull(false).withPojo(Foo.class).build());
fooOffsetSchema = AvroSchema.of(Foo.class);
fooOffsetSchema.getAvroSchema().addProp(GenericAvroSchema.OFFSET_PROP, 5);
foo = new Foo();
foo.setField1("foo1");
foo.setField2("bar1");
foo.setField4(new SchemaTestUtils.Bar());
foo.setFieldUnableNull("notNull");
fooV2 = new FooV2();
fooV2.setField1("foo1");
fooV2.setField3(10);
}
use of org.apache.pulsar.client.impl.schema.SchemaTestUtils.FooV2 in project incubator-pulsar by apache.
the class GenericAvroReaderTest method setup.
@BeforeMethod
public void setup() {
fooSchema = AvroSchema.of(Foo.class);
fooV2Schema = AvroSchema.of(FooV2.class);
fooSchemaNotNull = AvroSchema.of(SchemaDefinition.builder().withAlwaysAllowNull(false).withPojo(Foo.class).build());
fooOffsetSchema = AvroSchema.of(Foo.class);
fooOffsetSchema.getAvroSchema().addProp(GenericAvroSchema.OFFSET_PROP, 5);
foo = new Foo();
foo.setField1("foo1");
foo.setField2("bar1");
foo.setField4(new SchemaTestUtils.Bar());
foo.setFieldUnableNull("notNull");
fooV2 = new FooV2();
fooV2.setField1("foo1");
fooV2.setField3(10);
}
Aggregations