Skip to content

Instantly share code, notes, and snippets.

@nalitzis
Created May 12, 2012 15:50
Show Gist options
  • Save nalitzis/2667258 to your computer and use it in GitHub Desktop.
Save nalitzis/2667258 to your computer and use it in GitHub Desktop.
public void testGetMedia() throws Throwable{
final Context context = getInstrumentation().getTargetContext();
final CountDownLatch signal = new CountDownLatch(1);
final NetworkTasks networkTasks = new NetworkTasks(context, new GetMediaListener(signal));
runTestOnUiThread(new Runnable() {
public void run() {
Media media = new Media();
media.setId("179");
networkTasks.getMedia(media);
}
});
signal.await(30, TimeUnit.SECONDS);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment