コード例 #1
0
 @Test
 public void testLogin() throws Throwable {
   runOnMainSync(
       new Runnable() {
         @Override
         public void run() {
           loginTestTask.execute();
         }
       });
   completionLatch.await();
 }
コード例 #2
0
 private void loadPage(final String title) throws Throwable {
   completionLatch = new TestLatch();
   getInstrumentation()
       .runOnMainSync(
           new Runnable() {
             @Override
             public void run() {
               fragment = (PageFragment) activity.getTopFragment();
               fragment.setPageLoadCallbacks(callback);
               loadPage(fragment, title);
             }
           });
   completionLatch.await();
 }
コード例 #3
0
 @Override
 public void onLoadComplete() {
   completionLatch.countDown();
 }
コード例 #4
0
 @Override
 public void onTokenRetrieved(String token) {
   assertThat(token.equals("+\\"), is(false));
   completionLatch.countDown();
 }