Skip to content

User management tests and javadoc#165

Merged
Adish-Singh merged 4 commits intomainfrom
usermanagementtests
Dec 2, 2025
Merged

User management tests and javadoc#165
Adish-Singh merged 4 commits intomainfrom
usermanagementtests

Conversation

@kunsileeaa
Copy link
Copy Markdown
Collaborator

add tests for sign up, log in and log out

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit

checkstyle

🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.imports.CustomImportOrderCheck> reported by reviewdog 🐶
Extra separation in import group before 'use_case.login.LoginInputData'


🚫 [checkstyle] reported by reviewdog 🐶
Unnecessary consecutive lines

import static org.junit.jupiter.api.Assertions.*;


🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.imports.CustomImportOrderCheck> reported by reviewdog 🐶
Import statement for 'org.junit.jupiter.api.Assertions.*' is in the wrong order. Should be in the 'STATIC' group, expecting not assigned imports on this line.

import static org.junit.jupiter.api.Assertions.*;


🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.imports.ImportOrderCheck> reported by reviewdog 🐶
Wrong order for 'org.junit.jupiter.api.Assertions.*' import.

import static org.junit.jupiter.api.Assertions.*;


🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.imports.AvoidStarImportCheck> reported by reviewdog 🐶
Using the '.' form of import should be avoided - org.junit.jupiter.api.Assertions..

import static org.junit.jupiter.api.Assertions.*;


🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck> reported by reviewdog 🐶
Line is longer than 120 characters (found 128).

assertEquals(EXISTING_USERNAME, presenter.getSuccessUsername(), "Success view should be called with correct username.");


🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.naming.AbbreviationAsWordInNameCheck> reported by reviewdog 🐶
Abbreviation in name 'testLoginFailure_UserDNE' must contain no more than '1' consecutive capital letters.


🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.naming.MethodNameCheck> reported by reviewdog 🐶
Name 'testLoginFailure_UserDNE' must match pattern '^[a-z][a-zA-Z0-9]*$'.


🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.naming.MethodNameCheck> reported by reviewdog 🐶
Name 'testLoginFailure_IncorrectPassword' must match pattern '^[a-z][a-zA-Z0-9]*$'.

void testLoginFailure_IncorrectPassword() {


🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.NewlineAtEndOfFileCheck> reported by reviewdog 🐶
File does not end with a newline.


🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.naming.PackageNameCheck> reported by reviewdog 🐶
Name 'use_case.user_management' must match pattern '^[a-z]+(.[a-zA-Z_]\w*)*$'.


🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.coding.ExplicitInitializationCheck> reported by reviewdog 🐶
Variable 'successUsername' explicitly initialized to 'null' (default value for its type).


🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.NewlineAtEndOfFileCheck> reported by reviewdog 🐶
File does not end with a newline.


🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.naming.PackageNameCheck> reported by reviewdog 🐶
Name 'use_case.user_management' must match pattern '^[a-z]+(.[a-zA-Z_]\w*)*$'.


🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.imports.CustomImportOrderCheck> reported by reviewdog 🐶
Import statement for 'org.junit.jupiter.api.Test' is in the wrong order. Should be in the 'THIRD_PARTY_PACKAGE' group, expecting not assigned imports on this line.


🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.imports.ImportOrderCheck> reported by reviewdog 🐶
Wrong order for 'org.junit.jupiter.api.Test' import.


🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.imports.CustomImportOrderCheck> reported by reviewdog 🐶
Extra separation in import group before 'use_case.signup.SignupInputData'


🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.imports.ImportOrderCheck> reported by reviewdog 🐶
'use_case.signup.SignupInputData' should be separated from previous imports.


🚫 [checkstyle] reported by reviewdog 🐶
Unnecessary consecutive lines

import static org.junit.jupiter.api.Assertions.*;


🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.imports.CustomImportOrderCheck> reported by reviewdog 🐶
Import statement for 'org.junit.jupiter.api.Assertions.*' is in the wrong order. Should be in the 'STATIC' group, expecting not assigned imports on this line.

import static org.junit.jupiter.api.Assertions.*;


🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.imports.ImportOrderCheck> reported by reviewdog 🐶
Wrong order for 'org.junit.jupiter.api.Assertions.*' import.

import static org.junit.jupiter.api.Assertions.*;


🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.imports.AvoidStarImportCheck> reported by reviewdog 🐶
Using the '.' form of import should be avoided - org.junit.jupiter.api.Assertions..

import static org.junit.jupiter.api.Assertions.*;


🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.naming.AbbreviationAsWordInNameCheck> reported by reviewdog 🐶
Abbreviation in name 'NEW_USERNAME' must contain no more than '1' consecutive capital letters.

private final String NEW_USERNAME = "newUserForTest";


🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.naming.MemberNameCheck> reported by reviewdog 🐶
Name 'NEW_USERNAME' must match pattern '^[a-z][a-zA-Z0-9]*$'.

private final String NEW_USERNAME = "newUserForTest";


🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.naming.AbbreviationAsWordInNameCheck> reported by reviewdog 🐶
Abbreviation in name 'EXISTING_USERNAME' must contain no more than '1' consecutive capital letters.

private final String EXISTING_USERNAME = "test_1";


🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.naming.MemberNameCheck> reported by reviewdog 🐶
Name 'EXISTING_USERNAME' must match pattern '^[a-z][a-zA-Z0-9]*$'.

private final String EXISTING_USERNAME = "test_1";


🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.naming.AbbreviationAsWordInNameCheck> reported by reviewdog 🐶
Abbreviation in name 'TEST_PASSWORD' must contain no more than '1' consecutive capital letters.

private final String TEST_PASSWORD = "testPassword";


🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.naming.MemberNameCheck> reported by reviewdog 🐶
Name 'TEST_PASSWORD' must match pattern '^[a-z][a-zA-Z0-9]*$'.

private final String TEST_PASSWORD = "testPassword";


🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.naming.MethodNameCheck> reported by reviewdog 🐶
Name 'testSignupFailure_PasswordsDontMatch' must match pattern '^[a-z][a-zA-Z0-9]*$'.

void testSignupFailure_PasswordsDontMatch() {


🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.naming.MethodNameCheck> reported by reviewdog 🐶
Name 'testSignupFailure_EmptyPassword' must match pattern '^[a-z][a-zA-Z0-9]*$'.


🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.naming.MethodNameCheck> reported by reviewdog 🐶
Name 'testSignupFailure_EmptyUsername' must match pattern '^[a-z][a-zA-Z0-9]*$'.


🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.naming.MethodNameCheck> reported by reviewdog 🐶
Name 'testSignupFailure_UserExists' must match pattern '^[a-z][a-zA-Z0-9]*$'.

Comment thread src/test/java/use_case/user_management/MockLoginPresenter.java
Comment thread src/test/java/use_case/user_management/LogoutInteractorTest.java
Comment thread src/test/java/use_case/user_management/LogoutInteractorTest.java
package use_case.user_management;

import data_access.InMemoryUserDataAccessObject;
import org.junit.jupiter.api.Test;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.imports.ImportOrderCheck> reported by reviewdog 🐶
Wrong order for 'org.junit.jupiter.api.Test' import.


import data_access.InMemoryUserDataAccessObject;
import org.junit.jupiter.api.Test;
import use_case.logout.LogoutInteractor;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.imports.ImportOrderCheck> reported by reviewdog 🐶
'use_case.logout.LogoutInteractor' should be separated from previous imports.

import org.junit.jupiter.api.Test;
import use_case.logout.LogoutInteractor;

import static org.junit.jupiter.api.Assertions.*;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.imports.AvoidStarImportCheck> reported by reviewdog 🐶
Using the '.' form of import should be avoided - org.junit.jupiter.api.Assertions..

@@ -0,0 +1,35 @@
package use_case.user_management;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.naming.PackageNameCheck> reported by reviewdog 🐶
Name 'use_case.user_management' must match pattern '^[a-z]+(.[a-zA-Z_]\w*)*$'.

Comment thread src/test/java/use_case/user_management/LoginInteractorTest.java
Comment thread src/test/java/use_case/user_management/LoginInteractorTest.java
Comment thread src/test/java/use_case/user_management/LoginInteractorTest.java
@Peter-Hu12138
Copy link
Copy Markdown
Collaborator

Please resolve the style problems before I merge

Comment thread src/test/java/use_case/user_management/LoginInteractorTest.java
Comment thread src/test/java/use_case/user_management/LoginInteractorTest.java
Comment thread src/test/java/use_case/user_management/LoginInteractorTest.java
Comment thread src/test/java/use_case/user_management/LoginInteractorTest.java
@@ -0,0 +1,17 @@
package use_case.user_management;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.naming.PackageNameCheck> reported by reviewdog 🐶
Name 'use_case.user_management' must match pattern '^[a-z]+(.[a-zA-Z_]\w*)*$'.

import entities.UserFactory;

import org.junit.jupiter.api.Test;
import use_case.signup.SignupInputData;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.imports.ImportOrderCheck> reported by reviewdog 🐶
'use_case.signup.SignupInputData' should be separated from previous imports.

import use_case.signup.SignupInputData;
import use_case.signup.SignupInteractor;

import static org.junit.jupiter.api.Assertions.*;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [checkstyle] reported by reviewdog 🐶
Unnecessary consecutive lines

import use_case.signup.SignupInputData;
import use_case.signup.SignupInteractor;

import static org.junit.jupiter.api.Assertions.*;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.imports.CustomImportOrderCheck> reported by reviewdog 🐶
Import statement for 'org.junit.jupiter.api.Assertions.*' is in the wrong order. Should be in the 'STATIC' group, expecting not assigned imports on this line.

import use_case.signup.SignupInputData;
import use_case.signup.SignupInteractor;

import static org.junit.jupiter.api.Assertions.*;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.imports.ImportOrderCheck> reported by reviewdog 🐶
Wrong order for 'org.junit.jupiter.api.Assertions.*' import.

import use_case.signup.SignupInputData;
import use_case.signup.SignupInteractor;

import static org.junit.jupiter.api.Assertions.*;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [checkstyle] <com.puppycrawl.tools.checkstyle.checks.imports.AvoidStarImportCheck> reported by reviewdog 🐶
Using the '.' form of import should be avoided - org.junit.jupiter.api.Assertions..

@kunsileeaa kunsileeaa requested review from matthew-SG and removed request for matthew-SG December 2, 2025 04:03
Comment thread src/test/java/use_case/user_management/MockLoginPresenter.java
Comment thread src/test/java/use_case/user_management/MockLoginPresenter.java
Comment thread src/test/java/use_case/user_management/LogoutInteractorTest.java
Comment thread src/test/java/use_case/user_management/LogoutInteractorTest.java
Comment thread src/test/java/use_case/user_management/LogoutInteractorTest.java
Comment thread src/test/java/use_case/user_management/SignupInteractorTest.java
Comment thread src/test/java/use_case/user_management/SignupInteractorTest.java
Comment thread src/test/java/use_case/user_management/SignupInteractorTest.java
Comment thread src/test/java/use_case/user_management/SignupInteractorTest.java
Comment thread src/test/java/use_case/user_management/SignupInteractorTest.java
@kunsileeaa kunsileeaa changed the title User management tests User management tests and javadoc Dec 2, 2025
@kunsileeaa
Copy link
Copy Markdown
Collaborator Author

and add javadocs

Copy link
Copy Markdown
Collaborator

@Adish-Singh Adish-Singh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for fixing the style of your code. The tests have 100% line coverage so great job.

@Adish-Singh Adish-Singh merged commit 0a2a898 into main Dec 2, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants