Package com.linkedin.data.schema.validator

Examples of com.linkedin.data.schema.validator.DataSchemaAnnotationValidator


{
  @Test
  public void testEmpty()
  {
    final EmptyRecord record = new EmptyRecord();
    final DataSchemaAnnotationValidator validator = new DataSchemaAnnotationValidator(record.schema());
    final ValidationResult result = ValidateDataAgainstSchema.validate(record.data(), record.schema(), new ValidationOptions(), validator);
    Assert.assertTrue(result.isValid());
  }
View Full Code Here


  @Test
  public void testNonEmpty()
  {
    final EmptyRecord record = new EmptyRecord();
    record.data().put("non", "empty");
    final DataSchemaAnnotationValidator validator = new DataSchemaAnnotationValidator(record.schema());
    final ValidationResult result = ValidateDataAgainstSchema.validate(record.data(),
                                                                       record.schema(),
                                                                       new ValidationOptions(),
                                                                       validator);
    Assert.assertFalse(result.isValid());
View Full Code Here

TOP

Related Classes of com.linkedin.data.schema.validator.DataSchemaAnnotationValidator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.