Search in sources :

Example 1 with PatternValidator

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

the class PatternValidatorTest method testEqualsDifferentPattern.

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

Example 2 with PatternValidator

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

the class PatternValidatorTest method testHashCode.

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

Example 3 with PatternValidator

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

the class PatternValidatorTest method testEqualsSelf.

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

Example 4 with PatternValidator

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

the class PatternValidatorTest method testEqualsNull.

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

Example 5 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)

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