/** * Assert that the supplied {@link Struct} is {@link Struct#validate() valid} and its {@link Struct#schema() schema} * matches that of the supplied {@code schema}. * * @param value the value with a schema; may not be null */ protected void assertSchemaMatchesStruct(SchemaAndValue value) { VerifyRecord.schemaMatchesStruct(value); }
/** * Assert that the supplied {@link Struct} is {@link Struct#validate() valid} and its {@link Struct#schema() schema} * matches that of the supplied {@code schema}. * * @param struct the {@link Struct} to validate; may not be null * @param schema the expected schema of the {@link Struct}; may not be null */ protected void assertSchemaMatchesStruct(Struct struct, Schema schema) { VerifyRecord.schemaMatchesStruct(struct, schema); }
assertThat(keyWithSchema.value()).isEqualTo(record.key()); msg = "comparing key to its schema"; schemaMatchesStruct(keyWithSchema); assertEquals(valueWithSchema.value(), record.value()); msg = "comparing value to its schema"; schemaMatchesStruct(valueWithSchema); assertEquals(keyWithSchema.value(), record.key()); msg = "comparing key to its schema"; schemaMatchesStruct(keyWithSchema); assertEquals(valueWithSchema.value(), record.value()); msg = "comparing value to its schema"; schemaMatchesStruct(valueWithSchema);
/** * Assert that the supplied {@link Struct} is {@link Struct#validate() valid} and its {@link Struct#schema() schema} * matches that of the supplied {@code schema}. * * @param value the value with a schema; may not be null */ protected void assertSchemaMatchesStruct(SchemaAndValue value) { VerifyRecord.schemaMatchesStruct(value); }
/** * Assert that the supplied {@link Struct} is {@link Struct#validate() valid} and its {@link Struct#schema() schema} * matches that of the supplied {@code schema}. * * @param struct the {@link Struct} to validate; may not be null * @param schema the expected schema of the {@link Struct}; may not be null */ protected void assertSchemaMatchesStruct(Struct struct, Schema schema) { VerifyRecord.schemaMatchesStruct(struct, schema); }