use of com.runwaysdk.dataaccess.database.DuplicateDataDatabaseException in project geoprism-registry by terraframe.
the class ListTypeTest method testFailMarkAsInvalidByType.
@Test
@Request
public void testFailMarkAsInvalidByType() {
JsonObject json = getJson(USATestData.ORG_NPS.getServerObject(), USATestData.HIER_ADMIN, USATestData.DISTRICT, USATestData.COUNTRY, USATestData.STATE);
ListType masterlist = ListType.apply(json);
try {
masterlist.markAsInvalid(USATestData.HIER_ADMIN.getServerObject(), USATestData.COUNTY.getServerObject());
Assert.assertTrue(masterlist.isValid());
} catch (DuplicateDataDatabaseException e) {
masterlist.delete();
}
}
use of com.runwaysdk.dataaccess.database.DuplicateDataDatabaseException in project geoprism-registry by terraframe.
the class ListTypeTest method testFailMarkAsInvalidByHierarchy.
@Test
@Request
public void testFailMarkAsInvalidByHierarchy() {
JsonObject json = getJson(USATestData.ORG_NPS.getServerObject(), USATestData.HIER_ADMIN, USATestData.DISTRICT, USATestData.COUNTRY, USATestData.STATE);
ListType masterlist = ListType.apply(json);
try {
masterlist.markAsInvalid(USATestData.HIER_SCHOOL.getServerObject(), USATestData.DISTRICT.getServerObject());
Assert.assertTrue(masterlist.isValid());
} catch (DuplicateDataDatabaseException e) {
masterlist.delete();
}
}
Aggregations