-
Notifications
You must be signed in to change notification settings - Fork 0
9-feature-1-user-registration #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
parmism
wants to merge
25
commits into
main
Choose a base branch
from
9-feature-1-user-registration
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 22 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
e71f7da
Minor Changes, just added some of the objects which I will implement …
Madhavan7 26632a1
Added a few methods, pending implementation
Madhavan7 0b25139
Added the required objects and wrote some code
Madhavan7 cb07aea
Wrote some code for the UI
Madhavan7 33eab38
Almost done implementation of UserRegistrationUI and UserVerificationUI
Madhavan7 b8f86ab
Minor changes
Madhavan7 e4efd7e
added changes made to another branch and brought it here
Madhavan7 5c4b5c9
added changes made to another branch and resolved conflicts
Madhavan7 bf8afc7
Made changes to UserRegistrationUI and UserVerificationUI the only is…
Madhavan7 a2a33b7
When tested using "TestUserDatabase3.csv" everything seems to work
Madhavan7 f837d19
Used Factory design pattern to change the method "sendVerificationCod…
Madhavan7 9c471f0
Figured out and corrected the bug in UserDatabase.createUser now its …
Madhavan7 776765e
Made changes to the gradle dependencies in order to facilitate email …
Madhavan7 f19fb12
Packaged all the files
Madhavan7 2f00f3a
There was design problems with user verification, so I changed the de…
Madhavan7 45271e7
Implemented Email verification
Madhavan7 bf563b5
Changed the Packaging Structure
Madhavan7 bbd6f94
Minor Changes
Madhavan7 73d358a
Merge branch 'main' into 9-feature-1-user-registration
Madhavan7 1007a1e
Minor Changes
Madhavan7 1da907a
Minor Changes
Madhavan7 705b6c9
Minor Changes
Madhavan7 6e91e27
Minor Changes
Madhavan7 a86bb7d
Merged conflicts from the main branch
Madhavan7 a6d0b75
Merged conflicts from the main branch
Madhavan7 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 characters
Binary file not shown.
4 changes: 2 additions & 2 deletions
4
...java/entities/userEntities/BasicUser.java → ...ava/Entities/user_entities/BasicUser.java
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
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
5 changes: 1 addition & 4 deletions
5
...va/entities/userEntities/UserFactory.java → ...a/Entities/user_entities/UserFactory.java
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
Empty file.
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
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
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
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
2 changes: 1 addition & 1 deletion
2
src/main/java/interface_adapters/User/UserModificationGateway.java
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
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
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
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
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
2 changes: 2 additions & 0 deletions
2
src/main/java/use_cases/chat_initiation_use_case/CheckUsername_Interactor.java
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
4 changes: 1 addition & 3 deletions
4
src/main/java/use_cases/user_profile_display_use_case/UserReader.java
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
Empty file.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import entities.user_entities.User; | ||
import data_access.UserDatabase; | ||
import entities.userEntities.User; | ||
import org.junit.jupiter.api.Assertions; | ||
import org.junit.jupiter.api.Test; | ||
|
||
|
@@ -9,44 +9,45 @@ | |
public class UserDatabaseTest { | ||
@Test | ||
public void addingFilesRightEmailAndUser(){ | ||
File accounts = new File("data_access/TestUserDatabase2.csv"); | ||
File accounts = new File("Test3"); | ||
UserDatabase accountDatabase = new UserDatabase(accounts); | ||
accountDatabase.createUser("MadhavGopakumar", "123", "[email protected]", "Basic"); | ||
Assertions.assertTrue(accountDatabase.UserExists("MadhavGopakumar", "[email protected]")); | ||
} | ||
@Test | ||
public void addingMultipleFiles(){ | ||
File accounts = new File("data_access/TestUserDatabase2.csv"); | ||
File accounts = new File("Test3"); | ||
UserDatabase accountDatabase = new UserDatabase(accounts); | ||
accountDatabase.createUser("MeenakshiGopakumar", "123", "[email protected]", "Basic"); | ||
Assertions.assertTrue(accountDatabase.UserExists("MeenakshiGopakumar", "[email protected]")); | ||
} | ||
@Test | ||
public void rightEmailWrongUser(){ | ||
File accounts = new File("data_access/TestUserDatabase2.csv"); | ||
File accounts = new File("Test3"); | ||
UserDatabase accountDatabase = new UserDatabase(accounts); | ||
accountDatabase.createUser("MadhavGopakumar", "123", "[email protected]", "Basic"); | ||
Assertions.assertTrue(accountDatabase.UserExists("MadG", "[email protected]")); | ||
} | ||
@Test | ||
public void rightUserWrongEmail(){ | ||
File accounts = new File("data_access/TestUserDatabase2.csv"); | ||
File accounts = new File("Test3"); | ||
UserDatabase accountDatabase = new UserDatabase(accounts); | ||
Assertions.assertTrue(accountDatabase.UserExists("MeenakshiGopakumar", "ma")); | ||
} | ||
@Test | ||
public void listedUsers(){ | ||
File accounts = new File("data_access/TestUserDatabase2.csv"); | ||
File accounts = new File("Test3"); | ||
UserDatabase accountDatabase = new UserDatabase(accounts); | ||
accountDatabase.createUser("MeenakshiGopakumar", "123", "[email protected]", "Basic"); | ||
List<User> lst = accountDatabase.getList(); | ||
String email = lst.get(0).getEmail(); | ||
System.out.println(email); | ||
Assertions.assertTrue(email.equals("[email protected]")); | ||
} | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe we can do another test with edge cases that contains empty informations (e.g. "" for email) |
||
@Test | ||
public void userGot() { | ||
File accounts = new File("data_access/TestUserDatabase2.csv"); | ||
File accounts = new File("Test3"); | ||
UserDatabase accountDatabase = new UserDatabase(accounts); | ||
accountDatabase.createUser("MeenakshiGopakumar", "123", "[email protected]", "Basic"); | ||
User user = accountDatabase.getUser("MeenakshiGopakumar"); | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is correct to delete this while loop since it is not necessary