X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.slc.example%2Fsrc%2Ftest%2Fjava%2Forg%2Fargeo%2Fslc%2Fexample%2Fjunit%2FExampleIntegrationTest.java;h=cdc8fd59654cb83a17d613ae1b8d7c44bf02cca7;hb=cdad00a2b6000a3baccf8fe062ede3ecaaf44f44;hp=132de6544a40f8e5ec6fe206d0ea84dc060341f2;hpb=fb6d4fddbaebc10487a1082f2d59c15c716ea455;p=gpl%2Fargeo-slc.git diff --git a/org.argeo.slc.example/src/test/java/org/argeo/slc/example/junit/ExampleIntegrationTest.java b/org.argeo.slc.example/src/test/java/org/argeo/slc/example/junit/ExampleIntegrationTest.java index 132de6544..cdc8fd596 100644 --- a/org.argeo.slc.example/src/test/java/org/argeo/slc/example/junit/ExampleIntegrationTest.java +++ b/org.argeo.slc.example/src/test/java/org/argeo/slc/example/junit/ExampleIntegrationTest.java @@ -25,9 +25,9 @@ public class ExampleIntegrationTest extends TestCase { private static Log log = LogFactory.getLog(ExampleIntegrationTest.class); /** Tests an end-to-end Ant run. */ - public void testAllRunSimple() { - String slcBase = System.getProperty("it.slc.base","exampleSlcAppli"); - File slcBaseDir = new File(slcBase).getAbsoluteFile(); + public void testAllRunSimple() throws Exception { + String slcBase = System.getProperty("it.slc.base", "exampleSlcAppli"); + File slcBaseDir = new File(slcBase).getCanonicalFile(); log.info("SLC base: " + slcBaseDir); String reportDirPath = slcBaseDir.getPath() + "/work/results/report/"; @@ -65,6 +65,17 @@ public class ExampleIntegrationTest extends TestCase { "/root/Category1/SubCategory2/testError/slc.test0", 0, TestStatus.ERROR, "Execute example appli"); + // Context + assertPart(testResult1, + "/root/Category1/SubCategory2/testContext/slc.test1/reference", + 0, TestStatus.PASSED, "Values matched for key 'reference'"); + assertPart(testResult1, + "/root/Category1/SubCategory2/testContext/slc.test1/varIntern", + 0, TestStatus.PASSED, "Values matched for key 'varIntern'"); + assertPart(testResult1, + "/root/Category1/SubCategory2/testContext/slc.test1/varExtern", + 0, TestStatus.PASSED, "Values matched for key 'varExtern'"); + numericTRId.setValue(2l); TreeTestResult testResult2 = (TreeTestResult) testResultDao .getTestResult(numericTRId);