Created
September 10, 2014 15:58
-
-
Save AndrienkoAleksandr/8001cbd018709d73bc8c to your computer and use it in GitHub Desktop.
Revisions
-
AndrienkoAleksandr created this gist
Sep 10, 2014 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ ArgumentCaptor<UserChangedCallBack> userCapture = ArgumentCaptor.forClass(UserChangedCallBack.class); doNothing().when(dialogBoxPresenter).showDialog(any(User.class), userCapture.capture()); usersListPresenter.onAddButtonClicked(); userCapture.getValue().onChanged(user); 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ doAnswer(new Answer() { @Override public Void answer(InvocationOnMock invocationOnMock) throws Throwable { UserChangedCallBack callBack = (UserChangedCallBack) invocationOnMock.getArguments()[1]; callBack.onChanged(userForDeleting); return null; } }).when(dialogBoxPresenter).showDialog(any(User.class), any(UserChangedCallBack.class)); usersListPresenter.onAddButtonClicked();