From cba3b4f6a26aee3009a56b899a1cb9f093aba805 Mon Sep 17 00:00:00 2001 From: Serban Jora Date: Mon, 2 Oct 2017 13:20:50 -0400 Subject: Add unit testing JUnit based testing added to the checker lib and service, work in progress. Includes grammar correction. Change-Id: I8fa950f89faba24e7b45ef41cbc0402362b3f394 Issue-Id: MODELING-26 Signed-off-by: Serban Jora --- .../checker/src/main/java/org/onap/tosca/checker/Checker.java | 2 +- .../checker/src/main/resources/tosca/tosca_simple_yaml_1_1.grammar | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'javatoscachecker/checker/src/main') diff --git a/javatoscachecker/checker/src/main/java/org/onap/tosca/checker/Checker.java b/javatoscachecker/checker/src/main/java/org/onap/tosca/checker/Checker.java index 4218b85..358dc2b 100644 --- a/javatoscachecker/checker/src/main/java/org/onap/tosca/checker/Checker.java +++ b/javatoscachecker/checker/src/main/java/org/onap/tosca/checker/Checker.java @@ -3651,7 +3651,7 @@ System.out.println(" **** unassigned -> " + unassignedEntry.getKey() + " : " + u private String defaultImportsPath = null; private List grammars = new LinkedList(); - protected CheckerConfiguration() { + public CheckerConfiguration() { withGrammars(Checker.grammarFiles); } diff --git a/javatoscachecker/checker/src/main/resources/tosca/tosca_simple_yaml_1_1.grammar b/javatoscachecker/checker/src/main/resources/tosca/tosca_simple_yaml_1_1.grammar index 39b11d9..abd6c39 100644 --- a/javatoscachecker/checker/src/main/resources/tosca/tosca_simple_yaml_1_1.grammar +++ b/javatoscachecker/checker/src/main/resources/tosca/tosca_simple_yaml_1_1.grammar @@ -643,10 +643,9 @@ _workflow_step_definition: &workflow_step_definition type: str filter: desc: "Filter is a map of attribute name, list of constraint clause that allows to provide a filtering logic" - type: map - mapping: - =: - *constraints_sequence + type: seq + sequence: + - *constraints_sequence activities: desc: "The list of sequential activities to be performed in this step" type: seq -- cgit 1.2.3-korg