Skip to content

Commit fdc6849

Browse files
committed
ADAP-102 added unit test for Application.getParentUuid
1 parent cd43e08 commit fdc6849

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

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

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,4 +437,31 @@ public void onError(Ack ack) {
437437

438438
assertEquals(0, latch.getCount());
439439
}
440+
441+
@Test
442+
public void getParentUuid() throws Exception {
443+
Application application = TestUtils.runApplication(TestUtils.getAppOptions(null), desktopConnection);
444+
final CountDownLatch latch = new CountDownLatch(1);
445+
application.getParentUuid(
446+
new AsyncCallback<String>() {
447+
@Override
448+
public void onSuccess(String uuid) {
449+
logger.info("getParentUuid: {}", uuid);
450+
latch.countDown();
451+
}
452+
}, new AckListener() {
453+
@Override
454+
public void onSuccess(Ack ack) {
455+
}
456+
457+
@Override
458+
public void onError(Ack ack) {
459+
logger.info("error getting uuid of parent application: {}", ack.getReason());
460+
}
461+
});
462+
463+
latch.await(5, TimeUnit.SECONDS);
464+
465+
assertEquals(0, latch.getCount());
466+
}
440467
}

0 commit comments

Comments
 (0)