-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. Updated login module in M-V-P style
2. Refactored LoginPage back to before the branch, updated Model's userIsFound's return value to int so Mockito test works. Updated Presenter's login method. 3. After this it works for me. The only weird thing is that for invaild user and vaild user case, need to click twice.
- Loading branch information
1 parent
133852a
commit b230c81
Showing
5 changed files
with
91 additions
and
183 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,8 +32,7 @@ public class MockitoPresenterTests { | |
public void presenterTest(){ | ||
when(view.getEmail()).thenReturn("[email protected]"); | ||
when(view.getPassword()).thenReturn("abcdef"); | ||
// when(model.userIsFound("[email protected]", "abcdef")).thenCallRealMethod(model.loginSuccess()); | ||
// when(model.loginSuccess()).thenReturn(1); | ||
when(model.userIsFound("[email protected]", "abcdef")).thenReturn(1); | ||
|
||
Presenter presenter = new Presenter(model, view); | ||
presenter.login(); | ||
|