diff options
author | 2017-09-08 09:34:19 -0400 | |
---|---|---|
committer | 2017-09-08 15:43:41 -0400 | |
commit | f94c995d4d2b5ffd7f7fa7cf6ec10cdcbf4932a7 (patch) | |
tree | b55fd1ba04576abec768823c4dad9f4a800909e2 /aai-core/src/test/resources/dbedgerules | |
parent | 6042ff29f5f1f00b537f4b92e7aeeded13810545 (diff) |
EdgeRules throws descriptive error on invalid rule
Also added test coverage, including refactoring of test resources to
simplify test suites.
Issue-ID: AAI-277
Change-Id: Ibfdc81342a139d121740f10bccc66a7420b61945
Signed-off-by: Threefoot, Jane (jt6620) <jt6620@att.com>
Diffstat (limited to 'aai-core/src/test/resources/dbedgerules')
-rw-r--r-- | aai-core/src/test/resources/dbedgerules/DbEdgeRules_test.json | 37 | ||||
-rw-r--r-- | aai-core/src/test/resources/dbedgerules/DbEdgeRules_test_broken.json | 35 |
2 files changed, 72 insertions, 0 deletions
diff --git a/aai-core/src/test/resources/dbedgerules/DbEdgeRules_test.json b/aai-core/src/test/resources/dbedgerules/DbEdgeRules_test.json new file mode 100644 index 00000000..0031d1f0 --- /dev/null +++ b/aai-core/src/test/resources/dbedgerules/DbEdgeRules_test.json @@ -0,0 +1,37 @@ +{ + "rules": [ + { + "from": "foo", + "to": "bar", + "label": "eats", + "direction": "OUT", + "multiplicity": "One2Many", + "contains-other-v": "NONE", + "delete-other-v": "${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE" + }, + { + "from": "foo", + "to": "baz", + "label": "isVeryHappyAbout", + "direction": "OUT", + "multiplicity": "One2Many", + "contains-other-v": "${direction}", + "delete-other-v": "${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE" + }, + { + "from": "quux", + "to": "foo", + "label": "dancesWith", + "direction": "IN", + "multiplicity": "One2Many", + "contains-other-v": "!${direction}", + "delete-other-v": "${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE" + } + ] +}
\ No newline at end of file diff --git a/aai-core/src/test/resources/dbedgerules/DbEdgeRules_test_broken.json b/aai-core/src/test/resources/dbedgerules/DbEdgeRules_test_broken.json new file mode 100644 index 00000000..d4b7f7f3 --- /dev/null +++ b/aai-core/src/test/resources/dbedgerules/DbEdgeRules_test_broken.json @@ -0,0 +1,35 @@ +{ + "rules": [ + { + "from": "foo", + "to": "bar", + "label": "eats", + "direction": "OUT", + "multiplicity": "One2Many", + "contains-other-v": "NONE", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE" + }, + { + "from": "foo", + "to": "baz", + "label": "isVeryHappyAbout", + "direction": "OUT", + "multiplicity": "One2Many", + "contains-other-v": "${direction}", + "delete-other-v": "${direction}", + "SVC-INFRA": "NONE", + "prevent-delete": "NONE" + }, + { + "from": "quux", + "to": "foo", + "label": "dancesWith", + "direction": "IN", + "multiplicity": "One2Many", + "contains-other-v": "!${direction}", + "delete-other-v": "${direction}", + "prevent-delete": "NONE" + } + ] +}
\ No newline at end of file |