diff --git a/agama/transpiler/pom.xml b/agama/transpiler/pom.xml index e6ee15a7a09..4172ec13994 100644 --- a/agama/transpiler/pom.xml +++ b/agama/transpiler/pom.xml @@ -17,7 +17,23 @@ + + + src/test/resources + true + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.19.1 + + + target/test-classes/testng.xml + + + org.antlr antlr4-maven-plugin @@ -77,6 +93,13 @@ jackson-annotations + + + org.testng + testng + test + + \ No newline at end of file diff --git a/agama/transpiler/src/main/java/io/jans/agama/dsl/Transpiler.java b/agama/transpiler/src/main/java/io/jans/agama/dsl/Transpiler.java index eb1f554a89b..0748ccfd824 100644 --- a/agama/transpiler/src/main/java/io/jans/agama/dsl/Transpiler.java +++ b/agama/transpiler/src/main/java/io/jans/agama/dsl/Transpiler.java @@ -310,9 +310,14 @@ public static TranspilationResult transpile(String flowQname, Set flowQN public static void runSyntaxCheck(String flowQname, String source) throws SyntaxException, TranspilerException { - Transpiler tr = new Transpiler(flowQname, null); + Transpiler tr = new Transpiler(flowQname, null); tr.validateName(tr.getFlowContext(source)); } + + public static void runSyntaxCheck(String source) throws SyntaxException, TranspilerException { + Transpiler tr = new Transpiler("", null); + tr.getFlowContext(source); + } public static void main(String... args) throws Exception { diff --git a/agama/transpiler/src/test/resources/log4j2-test.xml b/agama/transpiler/src/test/resources/log4j2-test.xml new file mode 100644 index 00000000000..493117549e2 --- /dev/null +++ b/agama/transpiler/src/test/resources/log4j2-test.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + +