Search in sources :

Example 6 with PatternValidator

use of ddf.catalog.validation.impl.validator.PatternValidator in project ddf by codice.

the class PatternValidatorTest method testEquals.

@Test
public void testEquals() {
    final PatternValidator validator1 = new PatternValidator("test");
    final PatternValidator validator2 = new PatternValidator("test");
    assertThat(validator1.equals(validator2), is(true));
    assertThat(validator2.equals(validator1), is(true));
}
Also used : PatternValidator(ddf.catalog.validation.impl.validator.PatternValidator) Test(org.junit.Test)

Example 7 with PatternValidator

use of ddf.catalog.validation.impl.validator.PatternValidator in project ddf by codice.

the class PatternValidatorTest method testHashCodeDifferentPattern.

@Test
public void testHashCodeDifferentPattern() {
    final PatternValidator validator1 = new PatternValidator("test1");
    final PatternValidator validator2 = new PatternValidator("test2");
    assertThat(validator1.hashCode(), not(validator2.hashCode()));
}
Also used : PatternValidator(ddf.catalog.validation.impl.validator.PatternValidator) Test(org.junit.Test)

Aggregations

PatternValidator (ddf.catalog.validation.impl.validator.PatternValidator)7 Test (org.junit.Test)6 EnumerationValidator (ddf.catalog.validation.impl.validator.EnumerationValidator)1 SizeValidator (ddf.catalog.validation.impl.validator.SizeValidator)1