Skip to content

Commit 5c4fc62

Browse files
committed
ADAP-102 WIP - unit test case for createFromManifest
1 parent 62f51a3 commit 5c4fc62

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

src/test/java/com/openfin/desktop/ApplicationTest.java

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
import org.junit.AfterClass;
1111
import org.junit.BeforeClass;
12+
import org.junit.Ignore;
1213
import org.junit.Test;
1314
import org.slf4j.Logger;
1415
import org.slf4j.LoggerFactory;
@@ -337,4 +338,32 @@ public void eventReceived(ActionEvent actionEvent) {
337338
assertEquals(cnt/2, latch.getCount());
338339
assertEquals(cnt/2, invokeCnt.get());
339340
}
341+
342+
@Ignore
343+
@Test
344+
public void createFromManifest() throws Exception {
345+
346+
final CountDownLatch latch = new CountDownLatch(1);
347+
348+
Application.createFromManifest("http://localhost:8080/app_stable.json", new AsyncCallback<Application>() {
349+
350+
@Override
351+
public void onSuccess(Application app) {
352+
app.run(new AckListener() {
353+
354+
@Override
355+
public void onSuccess(Ack ack) {
356+
latch.countDown();
357+
}
358+
359+
@Override
360+
public void onError(Ack ack) {
361+
logger.info("error running app: {}", ack.getReason());
362+
}});;
363+
}}, null, desktopConnection);
364+
365+
latch.await(50, TimeUnit.SECONDS);
366+
367+
assertEquals(0, latch.getCount());
368+
}
340369
}

0 commit comments

Comments
 (0)