File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
src/test/java/com/openfin/desktop Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 77import java .util .concurrent .TimeUnit ;
88import java .util .concurrent .atomic .AtomicInteger ;
99
10+ import org .json .JSONObject ;
1011import org .junit .AfterClass ;
1112import org .junit .BeforeClass ;
1213import org .junit .Ignore ;
@@ -409,4 +410,31 @@ public void onError(Ack ack) {
409410 assertEquals (0 , latch .getCount ());
410411 assertEquals (cnt , winCnt .get ());
411412 }
413+
414+ @ Test
415+ public void getInfo () throws Exception {
416+ Application application = TestUtils .runApplication (TestUtils .getAppOptions (null ), desktopConnection );
417+ final CountDownLatch latch = new CountDownLatch (1 );
418+ application .getInfo (
419+ new AsyncCallback <JSONObject >() {
420+ @ Override
421+ public void onSuccess (JSONObject obj ) {
422+ logger .info ("getInfo: {}" , obj .toString ());
423+ latch .countDown ();
424+ }
425+ }, new AckListener () {
426+ @ Override
427+ public void onSuccess (Ack ack ) {
428+ }
429+
430+ @ Override
431+ public void onError (Ack ack ) {
432+ logger .info ("error getting application info: {}" , ack .getReason ());
433+ }
434+ });
435+
436+ latch .await (5 , TimeUnit .SECONDS );
437+
438+ assertEquals (0 , latch .getCount ());
439+ }
412440}
You can’t perform that action at this time.
0 commit comments