]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - org.argeo.slc.example/src/test/java/org/argeo/slc/example/junit/ExampleIntegrationTest.java
Introduce context at ant level
[gpl/argeo-slc.git] / org.argeo.slc.example / src / test / java / org / argeo / slc / example / junit / ExampleIntegrationTest.java
index 592d228d8a9a6b0fa8426272514bff42fab74ef3..cdc8fd59654cb83a17d613ae1b8d7c44bf02cca7 100644 (file)
@@ -25,8 +25,8 @@ public class ExampleIntegrationTest extends TestCase {
        private static Log log = LogFactory.getLog(ExampleIntegrationTest.class);\r
 \r
        /** Tests an end-to-end Ant run. */\r
-       public void testAllRunSimple() throws Exception{\r
-               String slcBase = System.getProperty("it.slc.base","exampleSlcAppli");\r
+       public void testAllRunSimple() throws Exception {\r
+               String slcBase = System.getProperty("it.slc.base", "exampleSlcAppli");\r
                File slcBaseDir = new File(slcBase).getCanonicalFile();\r
                log.info("SLC base: " + slcBaseDir);\r
 \r
@@ -65,6 +65,17 @@ public class ExampleIntegrationTest extends TestCase {
                                "/root/Category1/SubCategory2/testError/slc.test0", 0,\r
                                TestStatus.ERROR, "Execute example appli");\r
 \r
+               // Context\r
+               assertPart(testResult1,\r
+                               "/root/Category1/SubCategory2/testContext/slc.test1/reference",\r
+                               0, TestStatus.PASSED, "Values matched for key 'reference'");\r
+               assertPart(testResult1,\r
+                               "/root/Category1/SubCategory2/testContext/slc.test1/varIntern",\r
+                               0, TestStatus.PASSED, "Values matched for key 'varIntern'");\r
+               assertPart(testResult1,\r
+                               "/root/Category1/SubCategory2/testContext/slc.test1/varExtern",\r
+                               0, TestStatus.PASSED, "Values matched for key 'varExtern'");\r
+\r
                numericTRId.setValue(2l);\r
                TreeTestResult testResult2 = (TreeTestResult) testResultDao\r
                                .getTestResult(numericTRId);\r