Search in sources :

Example 1 with SizeValidator

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

the class SizeValidatorTest method testEqualsDifferentMin.

@Test
public void testEqualsDifferentMin() {
    final SizeValidator validator1 = new SizeValidator(13, 1799);
    final SizeValidator validator2 = new SizeValidator(0, 1799);
    assertThat(validator1.equals(validator2), is(false));
    assertThat(validator2.equals(validator1), is(false));
}
Also used : SizeValidator(ddf.catalog.validation.impl.validator.SizeValidator) Test(org.junit.Test)

Example 2 with SizeValidator

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

the class SizeValidatorTest method testEquals.

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

Example 3 with SizeValidator

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

the class SizeValidatorTest method testEqualsNull.

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

Example 4 with SizeValidator

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

the class SizeValidatorTest method testHashCodeDifferentMax.

@Test
public void testHashCodeDifferentMax() {
    final SizeValidator validator1 = new SizeValidator(13, 1799);
    final SizeValidator validator2 = new SizeValidator(13, 2000);
    assertThat(validator1.hashCode(), not(validator2.hashCode()));
}
Also used : SizeValidator(ddf.catalog.validation.impl.validator.SizeValidator) Test(org.junit.Test)

Example 5 with SizeValidator

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

the class SizeValidatorTest method testHashCodeDifferentMin.

@Test
public void testHashCodeDifferentMin() {
    final SizeValidator validator1 = new SizeValidator(13, 1799);
    final SizeValidator validator2 = new SizeValidator(0, 1799);
    assertThat(validator1.hashCode(), not(validator2.hashCode()));
}
Also used : SizeValidator(ddf.catalog.validation.impl.validator.SizeValidator) Test(org.junit.Test)

Aggregations

SizeValidator (ddf.catalog.validation.impl.validator.SizeValidator)9 Test (org.junit.Test)8 EnumerationValidator (ddf.catalog.validation.impl.validator.EnumerationValidator)1 PatternValidator (ddf.catalog.validation.impl.validator.PatternValidator)1