Skip to content

Instantly share code, notes, and snippets.

@trevorrjohn
Last active November 10, 2015 17:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trevorrjohn/b3cdb51de53e2be13048 to your computer and use it in GitHub Desktop.
Save trevorrjohn/b3cdb51de53e2be13048 to your computer and use it in GitHub Desktop.
TestSub<Repo> testSub = new TestSub();
when(service.getRepo(anyString()))
.thenReturn(Observable.onCreate(testSub));
activity.onCreate(null);
testSub.onNext(new Repo("RxAndroid"));
assertThat(repoView).hasText("RxAndroid");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment