Last active
September 5, 2016 17:52
-
-
Save miquelbeltran/ce4f3d062cee48223ab3640ffe268d25 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void ProfilePresenterTest { | |
@Mock | |
ProfileInteractor interactor; | |
@Mock | |
ProfileView view; | |
@Before | |
public void setUp() throws Exception { | |
MockitoAnnotations.initMocks(this); | |
when(interactor.getUserProfile()).thenReturn(Observable.just(new UserProfile())); | |
presenter = new ProfilePresenter(interactor); | |
presenter.attachView(view); | |
} | |
@Test | |
public void testDisplayCalled() { | |
verify(interactor).getUserProfile(); | |
verify(view).display(any()); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment