use of org.openforis.idm.model.TextAttribute in project collect by openforis.
the class PatternCheckTest method testUpperCaseLetterPatternFail2.
@Test
public void testUpperCaseLetterPatternFail2() {
Entity plot = EntityBuilder.addEntity(cluster, "plot");
TextAttribute subplot = EntityBuilder.addValue(plot, "subplot", "4");
ValidationResults results = validate(subplot);
assertTrue(containsPatternCheck(results.getErrors()));
}
use of org.openforis.idm.model.TextAttribute in project collect by openforis.
the class PatternCheckTest method testValidPattern2.
@Test
public void testValidPattern2() {
TextAttribute id = EntityBuilder.addValue(household, "id", "X-102357");
ValidationResults results = validate(id);
assertFalse(containsPatternCheck(results.getErrors()));
}
use of org.openforis.idm.model.TextAttribute in project collect by openforis.
the class PatternCheckTest method testUpperCaseLetterPatternFail.
@Test
public void testUpperCaseLetterPatternFail() {
Entity plot = EntityBuilder.addEntity(cluster, "plot");
TextAttribute subplot = EntityBuilder.addValue(plot, "subplot", "d");
ValidationResults results = validate(subplot);
assertTrue(containsPatternCheck(results.getErrors()));
}
use of org.openforis.idm.model.TextAttribute in project collect by openforis.
the class PatternCheckTest method testInvalidPattern3.
@Test
public void testInvalidPattern3() {
TextAttribute id = EntityBuilder.addValue(household, "id", "X-");
ValidationResults results = validate(id);
assertTrue(containsPatternCheck(results.getErrors()));
}
use of org.openforis.idm.model.TextAttribute in project collect by openforis.
the class PatternCheckTest method testUpperCaseLetterPatternPass.
@Test
public void testUpperCaseLetterPatternPass() {
Entity plot = EntityBuilder.addEntity(cluster, "plot");
TextAttribute subplot = EntityBuilder.addValue(plot, "subplot", "D");
ValidationResults results = validate(subplot);
assertFalse(containsPatternCheck(results.getErrors()));
}
Aggregations