assertEquals(true, "IN".equalsIgnoreCase(rule.getContains()));
assertEquals(true, "NONE".equalsIgnoreCase(rule.getDeleteOtherV()));
assertEquals(true, MultiplicityRule.MANY2ONE.equals(rule.getMultiplicityRule()));
- assertEquals(true, "OUT".equalsIgnoreCase(rule.getServiceInfrastructure()));
assertEquals(true, "IN".equalsIgnoreCase(rule.getPreventDelete()));
}
rules.getAllRules();
}
- @Test
- public void getChildrenMissingPropertyTest() {
- EdgeRules rules = EdgeRules.getInstance("/dbedgerules/DbEdgeRules_test_broken.json");
-
- thrown.expect(RuntimeException.class);
- thrown.expectMessage("org.onap.aai.exceptions.AAIException: Rule between quux and foo is missing property SVC-INFRA.");
- rules.getChildren("foo");
- }
-
- @Test
- public void getEdgeRuleMissingPropertyTest() throws AAIException {
- EdgeRules rules = EdgeRules.getInstance("/dbedgerules/DbEdgeRules_test_broken.json");
-
- thrown.expect(RuntimeException.class);
- rules.getEdgeRules("foo", "quux");
- }
-
@Test
public void verifyAllRules() {
// This will cause every rule in the real json files to be verified