summaryrefslogtreecommitdiff
path: root/src/test/java/MainTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/MainTest.java')
-rw-r--r--src/test/java/MainTest.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/test/java/MainTest.java b/src/test/java/MainTest.java
index 0d35cd6..7809c25 100644
--- a/src/test/java/MainTest.java
+++ b/src/test/java/MainTest.java
@@ -10,6 +10,7 @@ import com.c2kernel.persistency.outcome.Schema;
import com.c2kernel.persistency.outcome.SchemaValidator;
import com.c2kernel.process.Gateway;
import com.c2kernel.scripting.Script;
+import com.c2kernel.scripting.ScriptParsingException;
import com.c2kernel.utils.FileStringUtility;
import com.c2kernel.utils.Logger;
import com.c2kernel.utils.Resource;
@@ -36,7 +37,6 @@ public class MainTest {
String bootItems = FileStringUtility.url2String(Resource.getKernelResourceURL("boot/allbootitems.txt"));
StringTokenizer str = new StringTokenizer(bootItems, "\n\r");
- long castorTime=0;
while (str.hasMoreTokens()) {
String thisItem = str.nextToken();
Logger.msg(1, "Validating "+thisItem);
@@ -59,7 +59,6 @@ public class MainTest {
String remarshalled = Gateway.getMarshaller().marshall(unmarshalled);
long now = System.currentTimeMillis();
Logger.msg("Marshall/remarshall of "+thisItem+" took "+(now-then)+"ms");
- castorTime+=(now-then);
errors = validator.validate(remarshalled);
if (errors.length() > 0) {
Logger.error("Remarshalled resource "+thisItem+" has errors :"+errors);
@@ -74,8 +73,12 @@ public class MainTest {
// }
// assert xmlDiff.identical();
}
- }
- Logger.msg("Total Castor marshall time: "+castorTime+"ms");
+
+ if (itemType.equals("SC")) {
+ Logger.msg(1, "Parsing script "+thisItem);
+ new Script(thisItem, 0, data);
+ }
+ }
}
private static Schema getSchema(String name, int version, String resPath) throws ObjectNotFoundException {
@@ -91,7 +94,7 @@ public class MainTest {
}
assert errors.length()==0;
- Script testScript = new Script(testScriptString);
+ Script testScript = new Script("TestScript", 0, testScriptString);
assert testScript.getInputParams().size()==1;
assert testScript.getInputParams().get("test")!=null;