summaryrefslogtreecommitdiffstats
path: root/test/bindings/java/org/uscxml/examples/DataModelExample.java
diff options
context:
space:
mode:
authorStefan Radomski <github@mintwerk.de>2016-11-28 17:03:31 (GMT)
committerStefan Radomski <github@mintwerk.de>2016-11-28 17:03:31 (GMT)
commita6313d4ab2005196f376870c9ca945c691948416 (patch)
tree5345422d235e7c511885601854b6a2923db09e2e /test/bindings/java/org/uscxml/examples/DataModelExample.java
parentfcfc842a1ccee7a6b2579889f3236d50849c0679 (diff)
downloaduscxml-a6313d4ab2005196f376870c9ca945c691948416.zip
uscxml-a6313d4ab2005196f376870c9ca945c691948416.tar.gz
uscxml-a6313d4ab2005196f376870c9ca945c691948416.tar.bz2
Refactored Java into bindings and generated
Diffstat (limited to 'test/bindings/java/org/uscxml/examples/DataModelExample.java')
-rw-r--r--test/bindings/java/org/uscxml/examples/DataModelExample.java60
1 files changed, 0 insertions, 60 deletions
diff --git a/test/bindings/java/org/uscxml/examples/DataModelExample.java b/test/bindings/java/org/uscxml/examples/DataModelExample.java
deleted file mode 100644
index bba64eb..0000000
--- a/test/bindings/java/org/uscxml/examples/DataModelExample.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package org.uscxml.examples;
-
-import java.io.File;
-import java.net.MalformedURLException;
-
-import org.uscxml.Factory;
-import org.uscxml.Interpreter;
-import org.uscxml.InterpreterException;
-import org.uscxml.InterpreterState;
-import org.uscxml.dm.jexl.JexlDataModel;
-import org.uscxml.helper.TestMonitor;
-
-public class DataModelExample {
-
- public static void main(String[] args) {
- String uSCXMLLibPath = "/Users/sradomski/Documents/TK/Code/uscxml/build/cli/lib/libuscxmlNativeJava.jnilib";
- if (System.getenv().containsKey("USCXML_JAVA_LIB")) {
- uSCXMLLibPath = System.getenv("USCXML_JAVA_LIB");
- }
-
- System.load(uSCXMLLibPath);
-
- JexlDataModel jdm = new JexlDataModel();
- Factory.getInstance().registerDataModel(jdm);;
-
- TestMonitor tm = new TestMonitor();
-
- File folder = new File("/Users/sradomski/Documents/TK/Code/uscxml/test/w3c/jexl");
- File[] listOfFiles = folder.listFiles();
-
- try {
- for (File file : listOfFiles) {
- if (!file.getName().endsWith(".scxml"))
- continue;
- String testName = file.toURI().toURL().toString();
- System.out.println(testName);
-
- Interpreter scxml = Interpreter.fromURL(testName);
-// scxml.setMonitor(tm);
-
- while(scxml.step() != InterpreterState.USCXML_FINISHED) {}
-
- if (!scxml.isInState("pass")) {
- System.out.println("FAIL: " + testName);
-
- throw new RuntimeException();
- }
- System.out.println("SUCCESS");
-
- }
-
- } catch (InterpreterException | MalformedURLException e) {
- e.printStackTrace();
- System.exit(-1);
- }
- System.exit(0);
-
- }
-
-}