]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - integration-tests/org.argeo.slc.it.webapp/src/test/java/org/argeo/slc/it/webapp/SimpleScenarioTest.java
@update:79; INtroduce event polling (not working yet)
[gpl/argeo-slc.git] / integration-tests / org.argeo.slc.it.webapp / src / test / java / org / argeo / slc / it / webapp / SimpleScenarioTest.java
index 9ab5d75847120bcd58affbce686d1b0216cacb7e..16e4239226af2cb6beaadcb6383a8a9017b1a91f 100644 (file)
@@ -2,14 +2,15 @@ package org.argeo.slc.it.webapp;
 
 import org.argeo.slc.Condition;
 import org.argeo.slc.core.test.tree.TreeTestResultList;
+import org.argeo.slc.process.SlcExecution;
 import org.argeo.slc.server.client.SlcServerHttpClient;
 import org.argeo.slc.server.unit.AbstractHttpClientTestCase;
 
 public class SimpleScenarioTest extends AbstractHttpClientTestCase {
        public void testSimpleScenario() throws Exception {
                String moduleName = "org.argeo.slc.demo.basic";
-               assertAnswerOk(getHttpClient().startFlowDefault(moduleName, "main",
-                               null));
+               SlcExecution slcExecution = getHttpClient().startFlowDefault(
+                               moduleName, "main", null);
 
                getHttpClient().callServiceSafe(SlcServerHttpClient.LIST_RESULTS, null,
                                new Condition<TreeTestResultList>() {
@@ -18,5 +19,14 @@ public class SimpleScenarioTest extends AbstractHttpClientTestCase {
                                                return obj.getList().size() == 3;
                                        }
                                }, null);
+               
+               
+               getHttpClient().callServiceSafe(SlcServerHttpClient.LIST_RESULTS, null,
+                               new Condition<TreeTestResultList>() {
+
+                                       public Boolean check(TreeTestResultList obj) {
+                                               return obj.getList().size() == 3;
+                                       }
+                               }, null);
        }
 }