-
Notifications
You must be signed in to change notification settings - Fork 1
Unit Test Reports
![test-coverage1](https://private-user-images.githubusercontent.com/112198215/293408827-d923fb3c-4b2f-4abc-a5ee-0d1636e721ae.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0NDI1MTQsIm5iZiI6MTczOTQ0MjIxNCwicGF0aCI6Ii8xMTIxOTgyMTUvMjkzNDA4ODI3LWQ5MjNmYjNjLTRiMmYtNGFiYy1hNWVlLTBkMTYzNmU3MjFhZS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEzJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxM1QxMDIzMzRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0yODcxMzE3YzJhNTBjZWU5ZmM3ODg1MzY4OGY1NTg3NjFiZWRmZTlhMTFlNjFkOTMyYmM0ZTI4NTFiMDM2YTk2JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.J0CBJf570fT4J259ytkLsrD0Hr1WOHZZehN5jr-kSBk)
![test-coverage](https://private-user-images.githubusercontent.com/112198215/293408828-a42b1ce8-e54f-4ac0-8661-d6ca449eca4a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0NDI1MTQsIm5iZiI6MTczOTQ0MjIxNCwicGF0aCI6Ii8xMTIxOTgyMTUvMjkzNDA4ODI4LWE0MmIxY2U4LWU1NGYtNGFjMC04NjYxLWQ2Y2E0NDllY2E0YS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEzJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxM1QxMDIzMzRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1mMzc3NmIwN2FmZWU3NDNjOTQyZjY0ZjY0YTBiN2ZmY2IzZTEyMGYzYjEyMGRmNTY1OWY0OTMyZGE2MDI4OWM4JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.zL_UhfTHxj1FSl7mkX4XHNRpNwFvfijB2wuVt9l9JsM)
Test Case: Registering a New User
- Functionality Tested: Registering a new user with valid credentials.
- Tested Cases:
- Valid registration request with a unique username and email.
- Expected Outcome: The new user should be successfully registered with the provided credentials.
Test Case: Logging In a User
- Functionality Tested: Logging in a user with valid credentials.
- Tested Cases:
- Valid login request with correct email and password.
- Expected Outcome: The user should be successfully logged in, and a valid token should be generated.
Test Case: Logging In with Invalid Password
- Functionality Tested: Attempting to log in with an incorrect password.
- Tested Cases:
- Valid login request with an incorrect password.
- Expected Outcome: BadRequestException should be thrown.
Test Case: Retrieving All Users
- Functionality Tested: Retrieving a list of all users.
- Tested Cases:
- Request to get all users.
- Expected Outcome: A list containing all users should be returned.
Test Case: Retrieving Users with Filtering
- Functionality Tested: Retrieving a list of users based on filtering criteria.
- Tested Cases:
- Request to get users with a specific username filter.
- Expected Outcome: A list containing users matching the filter criteria should be returned.
Test Case: Retrieving a User by ID
- Functionality Tested: Retrieving a user by their unique identifier.
- Tested Cases:
- Request to get a user by a specific ID.
- Expected Outcome: The user with the specified ID should be returned.
Test Case: Deleting a User by ID
- Functionality Tested: Deleting a user by their unique identifier.
- Tested Cases:
- Request to delete a user by a specific ID.
- Expected Outcome: The user with the specified ID should be successfully marked as deleted.
Test Case: Creating a Game
- Functionality Tested: Creating a new game and saving it in the repository.
- Tested Cases:
- Valid request with specified game details and tags.
- Expected Outcome: The game should be successfully created and saved, and associated tags should be linked to the game.
Test Case: Retrieving Tags of a Game
- Functionality Tested: Retrieving all tags associated with a specified game.
- Tested Cases:
- Game exists, and it has associated tags.
- Expected Outcome: The list of tags associated with the specified game should be returned.
Test Case: Adding a Tag to a Game
- Functionality Tested: Adding a new tag to an existing game.
- Tested Cases:
- Valid request with a specified game and tag.
- Expected Outcome: The tag should be successfully added to the specified game.
Test Case: Removing a Tag from a Game
- Functionality Tested: Removing an existing tag from an existing game.
- Tested Cases:
- Valid request with a specified game and tag.
- Expected Outcome: The tag should be successfully removed from the specified game.
Test Case: Generating Game Recommendations Based on a Game
- Functionality Tested: Generating a set of recommended games based on a specified game.
- Tested Cases:
- Game exists, and similar games are found in the database.
- Expected Outcome: A set of recommended games should be returned based on the similarity score.
Test Case: Retrieving Game Details When Game Exists
- Functionality Tested: Retrieving detailed information about a game when it exists.
- Tested Cases:
- Game with the specified ID exists.
- Expected Outcome: Detailed information about the specified game should be returned.
Test Case: Retrieving Game Details by Name When Game Exists
- Functionality Tested: Retrieving detailed information about a game by name when it exists.
- Tested Cases:
- Game with the specified name exists.
- Expected Outcome: Detailed information about the specified game should be returned.
Test Case: Retrieving Recommended Games for a User
- Functionality Tested: Retrieving a list of recommended games for a specified user.
- Tested Cases:
- User exists, profile exists, and recommended games are found.
- Expected Outcome: A list of recommended games for the specified user should be returned.
Test Case: Retrieving Recommended Games for a Guest User
- Functionality Tested: Retrieving a list of recommended games for a guest user.
- Tested Cases:
- Recommended games are found for guest users.
- Expected Outcome: A list of recommended games for guest users should be returned.
Test Case: Editing Game Details
- Functionality Tested: Editing details of an existing game.
- Tested Cases:
- Game with the specified ID exists.
- Game details are successfully updated.
- Expected Outcome: The specified game's details should be successfully updated.
Test Case: Editing Game Details When Game Does Not Exist
- Functionality Tested: Attempting to edit details of a non-existent game.
- Tested Cases:
- Game with the specified ID does not exist.
- Expected Outcome: ResourceNotFoundException should be thrown.
Test Case: Deleting an Existing Game
- Functionality Tested: Deleting an existing game.
- Tested Cases:
- Game with the specified ID exists.
- Expected Outcome: The specified game should be successfully marked as deleted.
Test Case: Deleting a Non-Existent Game
- Functionality Tested: Attempting to delete a game that does not exist.
- Tested Cases:
- Game with the specified ID does not exist.
- Expected Outcome: ResourceNotFoundException should be thrown.
Test Case: Changing Promotion Status of a Game
- Functionality Tested: Changing the promotion status of an existing game.
- Tested Cases:
- Game with the specified ID exists.
- Expected Outcome: The promotion status of the specified game should be successfully toggled.
Test Case: Changing Promotion Status of a Non-Existent Game
- Functionality Tested: Attempting to change the promotion status of a game that does not exist.
- Tested Cases:
- Game with the specified ID does not exist.
- Expected Outcome: ResourceNotFoundException should be thrown.
Test Case: Calculating Similarity Score Between Games
- Functionality Tested: Calculating the similarity score between two games based on their tags.
- Tested Cases:
- Games with specified tags are provided.
- Expected Outcome: The similarity score between the two specified games should be calculated.
Test Case: Retrieving Filtered List of Games
- Functionality Tested: Retrieving a filtered list of games based on specified criteria.
- Tested Cases:
- Valid filter criteria provided.
- Expected Outcome: A filtered list of games based on the specified criteria should be returned.
Test Case: Retrieving All Tags
- Functionality Tested: Retrieving all tags based on specified criteria.
- Tested Cases:
- Valid filter criteria provided.
- Expected Outcome: All tags based on the specified criteria should be returned.
Test Case: Retrieving Tag by ID
- Functionality Tested: Retrieving a tag by its ID.
- Tested Cases:
- Tag with the specified ID exists.
- Expected Outcome: The tag with the specified ID should be returned.
Test Case: Creating a Tag
- Functionality Tested: Creating a new tag and saving it in the repository.
- Tested Cases:
- Valid request with a specified tag name.
- Tag with the same name does not exist.
- Expected Outcome: The tag should be successfully created and saved in the repository.
Test Case: Creating a Tag with an Existing Name
- Functionality Tested: Attempting to create a tag with a name that already exists.
- Tested Cases:
- Tag with the same name already exists.
- Expected Outcome: BadRequestException should be thrown.
Test Case: Updating Tag Details
- Functionality Tested: Updating details of an existing tag.
- Tested Cases:
- Tag with the specified ID exists.
- Expected Outcome: The specified tag's details should be successfully updated.
Test Case 1: banUser_SuccessfullyBanned
- Functionality Tested: Banning a user in a forum successfully.
- Tested Cases:
- Forum exists, user exists in the forum, and banning is successful.
- Expected Outcome: The user should be successfully banned in the specified forum.
Test Case 2: banUser_ForumNotFound
- Functionality Tested: Handling the case when the specified forum doesn't exist.
- Tested Cases:
- Forum does not exist.
- Expected Outcome: ResourceNotFoundException should be thrown.
Test Case 3: unbanUser_SuccessfullyUnbanned
- Functionality Tested: Unbanning a user in a forum.
- Tested Cases:
- Forum exists, user is banned in the forum, and unbanning is successful.
- Expected Outcome: The user should be successfully unbanned in the specified forum.
Test Case 4: unbanUser_ForumNotFound
- Functionality Tested: Handling the case when the specified forum doesn't exist.
- Tested Cases:
- Forum does not exist.
- Expected Outcome: ResourceNotFoundException should be thrown.
Test Case 1: createGroup_Success
- Functionality Tested: Creating a group.
- Tested Cases:
- Group title is unique.
- Tags exist and are associated with the group.
- Game exists and is associated with the group.
- Expected Outcome: The group should be successfully created with the specified details.
Test Case 2: createGroup_GroupWithTitleExists_ThrowsBadRequestException
- Functionality Tested: Handling the case when the group title already exists.
- Tested Cases:
- Group with the same title already exists.
- Expected Outcome: BadRequestException should be thrown.
Test Case 3: createGroup_TagNotFound_ThrowsResourceNotFoundException
- Functionality Tested: Handling the case when a specified tag is not found.
- Tested Cases:
- Tag specified in the request is not found.
- Expected Outcome: ResourceNotFoundException should be thrown.
Test Case 4: testGetAllGroups
- Functionality Tested: Retrieving all groups based on filter criteria.
- Tested Cases:
- Filter by title, sort by creation date, descending order, excluding deleted groups.
- Expected Outcome: List of groups should be retrieved based on the specified filter.
Test Case 5: testGetGroupById
- Functionality Tested: Retrieving detailed information about a group by its ID.
- Tested Cases:
- Group ID exists, user is a member, and user has a profile.
- Expected Outcome: Detailed information about the group should be retrieved.
Test Case 6: testGetGroupByIdNotFound
- Functionality Tested: Handling the case when the specified group ID is not found.
- Tested Cases:
- Group with the specified ID does not exist.
- Expected Outcome: ResourceNotFoundException should be thrown.
Test Case 7: testDeleteGroupByTitle
- Functionality Tested: Deleting a group by its title.
- Tested Cases:
- Group with the specified title exists.
- Expected Outcome: The group should be successfully deleted.
Test Case 8: testDeleteGroupNotFound
- Functionality Tested: Handling the case when the specified group is not found.
- Tested Cases:
- Group with the specified title does not exist.
- Expected Outcome: ResourceNotFoundException should be thrown.
Test Case 9: testUpdateGroup
- Functionality Tested: Updating details of a group.
- Tested Cases:
- Group with the specified ID exists.
- Expected Outcome: The group details should be successfully updated.
Test Case 10: testUpdateGroupNotFound
- Functionality Tested: Handling the case when the specified group is not found.
- Tested Cases:
- Group with the specified ID does not exist.
- Expected Outcome: ResourceNotFoundException should be thrown.
Test Case 11: testUpdateGroupInvalidQuota
- Functionality Tested: Handling the case when the new quota is invalid.
- Tested Cases:
- Quota is less than the current number of members.
- Expected Outcome: BadRequestException should be thrown.
Test Case 12: testJoinGroup_Success
- Functionality Tested: Joining a public group.
- Tested Cases:
- Group with the specified ID is public.
- Expected Outcome: User should successfully join the group.
Test Case 13: testJoinPrivateGroup
- Functionality Tested: Handling the case when attempting to join a private group.
- Tested Cases:
- Group with the specified ID is private.
- Expected Outcome: BadRequestException should be thrown.
Test Case 14: testJoinFullGroup
- Functionality Tested: Handling the case when attempting to join a full group.
- Tested Cases:
- Group with the specified ID has reached its quota.
- Expected Outcome: BadRequestException should be thrown.
Test Case 15: testLeaveGroup_Success
- Functionality Tested: Leaving a group.
- Tested Cases:
- User is a member of the group.
- Expected Outcome: User should successfully leave the group.
Test Case 16: testLeaveGroupNotFound
- Functionality Tested: Handling the case when the specified group ID is not found.
- Tested Cases:
- Group with the specified ID does not exist.
- Expected Outcome: ResourceNotFoundException should be thrown.
Test Case 17: testApplyGroup
- Functionality Tested: Applying to join a group.
- Tested Cases:
- Group with the specified ID is private.
- Expected Outcome: User should successfully apply to join the group.
Test Case 18: testApplyGroupNotFound
- Functionality Tested: Handling the case when the specified group ID is not found.
- Tested Cases:
- Group with the specified ID does not exist.
- Expected Outcome: ResourceNotFoundException should be thrown.
Test Case 19: testApplyGroupPublicGroup
- Functionality Tested: Handling the case when attempting to apply to join a public group.
- Tested Cases:
- Group with the specified ID is public.
- Expected Outcome: BadRequestException should be thrown.
Test Case 20: testApplyGroupAlreadyMember
- Functionality Tested: Handling the case when the user is already a member of the group.
- Tested Cases:
- User is already a member of the group.
- Expected Outcome: BadRequestException should be thrown.
Test Case 21: testApplyGroupBannedMember
- Functionality Tested: Handling the case when the user is banned from the group.
- Tested Cases:
- User is banned from the group.
- Expected Outcome: BadRequestException should be thrown.
Test Case 22: testApplyGroupPendingRequest
- Functionality Tested: Handling the case when the user already has a pending application for the group.
- Tested Cases:
- User already has a pending application for the group.
- Expected Outcome: BadRequestException should be thrown.
Test Case 1: createComment_SuccessfulCreation
- Functionality Tested: Creating a comment on a post successfully.
- Tested Cases:
- Post exists, profile exists, and comment creation is successful.
- Expected Outcome: A new comment should be successfully created and saved.
Test Case 2: createComment_PostNotFound
- Functionality Tested: Handling the case when the specified post doesn't exist.
- Tested Cases:
- Post does not exist.
- Expected Outcome: ResourceNotFoundException should be thrown.
Test Case 3: replyComment_SuccessfulReply
- Functionality Tested: Replying to a comment on a post.
- Tested Cases:
- Parent comment exists, profile exists, and reply comment creation is successful.
- Expected Outcome: A reply to the comment should be successfully created and saved.
Test Case 4: editComment_SuccessfulEdit
- Functionality Tested: Editing an existing comment.
- Tested Cases:
- Comment exists and edit operation is successful.
- Expected Outcome: The comment should be successfully edited and updated.
Test Case 5: deleteComment_SuccessfulDeletion
- Functionality Tested: Deleting an existing comment.
- Tested Cases:
- Comment exists and deletion operation is successful.
- Expected Outcome: The comment should be successfully marked as deleted.
Test Case 6: getUserCommentList_SuccessfulRetrieval
- Functionality Tested: Retrieving a list of comments made by a user.
- Tested Cases:
- User has made comments and retrieval operation is successful.
- Expected Outcome: A list of comments made by the user should be successfully retrieved.
Test Case 1: GetAllReviews_ReturnsAllReviews
- Functionality Tested: Retrieving all reviews based on provided filters.
- Tested Cases:
- Filters set for gameId, reviewedBy, withDeleted, sortBy, and sortDirection.
- Valid return of review list from the repository.
- Expected Outcome: A non-null list of GetAllReviewsResponseDto is returned.
Test Case 2: GetReview_ReturnsReview
- Functionality Tested: Retrieving a single review by its ID.
- Tested Cases:
- Review with the specified ID exists.
- Expected Outcome: A non-null GetAllReviewsResponseDto corresponding to the given ID is returned.
Test Case 3: GetReview_ReviewNotFound
- Functionality Tested: Handling the case when the specified review ID does not exist.
- Tested Cases:
- Review with the specified ID does not exist.
- Expected Outcome: ResourceNotFoundException should be thrown.
Test Case 4: AddReview_SuccessfullyAdded
- Functionality Tested: Successfully adding a new review.
- Tested Cases:
- Valid review data is provided.
- Expected Outcome: The review should be successfully added and returned.
Test Case 5: UpdateReview_SuccessfullyUpdated
- Functionality Tested: Successfully updating an existing review.
- Tested Cases:
- Review exists and valid update data is provided.
- Expected Outcome: Review should be successfully updated.
Test Case 6: UpdateReview_ReviewNotFound
- Functionality Tested: Handling the case when the review to update is not found.
- Tested Cases:
- Review with the specified ID does not exist.
- Expected Outcome: ResourceNotFoundException should be thrown.
Test Case 7: DeleteReview_SuccessfullyDeleted
- Functionality Tested: Successfully deleting a review.
- Tested Cases:
- Review exists for the given ID.
- Expected Outcome: Review should be successfully deleted.
Test Case 8: DeleteReview_ReviewNotFound
- Functionality Tested: Handling the case when the review to delete is not found.
- Tested Cases:
- Review with the specified ID does not exist.
- Expected Outcome: ResourceNotFoundException should be thrown.
Test Case 1: editProfile_SuccessfulEdit
- Functionality Tested: Editing a user's profile successfully.
- Tested Cases:
- Profile exists and edit operation is successful.
- Expected Outcome: The profile should be successfully updated.
Test Case 2: editProfile_ProfileNotFound
- Functionality Tested: Handling the case when the specified profile doesn't exist.
- Tested Cases:
- Profile does not exist.
- Expected Outcome: ResourceNotFoundException should be thrown.
Test Case 3: addGameToProfile_SuccessfulAddition
- Functionality Tested: Adding a game to a user's profile.
- Tested Cases:
- Profile and game exist, and addition operation is successful.
- Expected Outcome: The game should be successfully added to the profile.
Test Case 4: removeGameFromProfile_SuccessfulRemoval
- Functionality Tested: Removing a game from a user's profile.
- Tested Cases:
- Profile and game exist, and removal operation is successful.
- Expected Outcome: The game should be successfully removed from the profile.
Test Case 5: getProfile_PrivateProfileAccessDenied
- Functionality Tested: Accessing a private profile by a non-owner and non-admin user.
- Tested Cases:
- Profile is private, and accessed by a non-owner and non-admin user.
- Expected Outcome: BadRequestException should be thrown.
Test Case 6: getProfile_SuccessfulRetrieval
- Functionality Tested: Successfully retrieving a public profile.
- Tested Cases:
- Profile is public and accessible.
- Expected Outcome: The profile should be successfully retrieved.
Test Case 1: testCreateAchievement_GameAchievement_Success
- Functionality Tested: Creating a game achievement successfully.
- Tested Cases:
- Game exists. No existing achievements with the same title.
- Expected Outcome: The game achievement should be successfully created.
Test Case 2: testCreateAchievement_MetaAchievement_Success
- Functionality Tested: Creating a meta achievement successfully.
- Tested Cases:
- No existing achievements with the same title.
- Expected Outcome: The meta achievement should be successfully created.
Test Case 3: testUpdateAchievement_Success
- Functionality Tested: Updating an achievement successfully.
- Tested Cases:
- Achievement exists, and is not deleted.
- Expected Outcome: The achievement should be successfully updated with the new fields.
Test Case 4: testDeleteAchievementById_Success
- Functionality Tested: Deleting an achievement by ID successfully.
- Tested Cases:
- Achievement exists, and is not deleted.
- Expected Outcome: The achievement should be successfully marked as deleted.
Test Case 5: testDeleteAchievement_NotFoundById
- Functionality Tested: Handling the case when the achievement is not found by ID.
- Tested Cases:
- Achievement does not exist or already deleted.
- Expected Outcome: ResourceNotFoundException should be thrown.
Test Case 6: testDeleteAchievementByNameAndGame_Success
- Functionality Tested: Deleting an achievement by name and game successfully.
- Tested Cases:
- Achievement exists, game exists, and the achievement is linked to the given game.
- Expected Outcome: The achievement should be successfully marked as deleted.
Test Case 7: testGrantAchievement_Success
- Functionality Tested: Granting an achievement successfully.
- Tested Cases:
- Achievement and user exist.
- Expected Outcome: The achievement should be successfully granted to the user.
Test Case: Retrieving List of Posts
- Functionality Tested: Retrieving a list of posts based on filter criteria.
- Tested Cases:
- Request to get a list of posts with a specific filter.
- Expected Outcome: A list containing posts based on the filter criteria should be returned.
Test Case: Retrieving Post by ID
- Functionality Tested: Retrieving a post by its unique identifier.
- Tested Cases:
- Request to get a post by a specific ID.
- Request to get a post with a non-existing ID (Not Found).
- Expected Outcome: The post with the specified ID should be returned. If the post ID does not exist, a ResourceNotFoundException should be thrown.
Test Case: Creating a Post
- Functionality Tested: Creating a new post.
- Tested Cases:
- Request to create a post with valid data.
- Expected Outcome: The post should be successfully created and returned.
Test Case: Editing a Post
- Functionality Tested: Editing an existing post.
- Tested Cases:
- Request to edit a post with valid data.
- Expected Outcome: The post should be successfully edited and returned.
Test Case: Deleting a Post
- Functionality Tested: Deleting an existing post.
- Tested Cases:
- Request to delete a post with a valid ID.
- Expected Outcome: The post should be successfully marked as deleted and returned.
Test Case: Retrieving User's Post List
- Functionality Tested: Retrieving a list of posts belonging to a specific user.
- Tested Cases:
- Request to get a list of posts for a specific user.
- Expected Outcome: A list containing posts belonging to the specified user should be returned.
Test Case: Retrieving Post Comments
- Functionality Tested: Retrieving comments associated with a specific post.
- Tested Cases:
- Request to get comments for a specific post.
- Expected Outcome: A list containing comments for the specified post should be returned.
Test Case: Retrieving Homepage Posts for a User
- Functionality Tested: Retrieving posts for a user's homepage based on filtering criteria.
- Tested Cases:
- Request to get homepage posts for a user with valid data.
- Expected Outcome: A list containing homepage posts for the specified user should be returned.
Test Case: Retrieving Homepage Posts for a User with Group Forum
- Functionality Tested: Retrieving posts for a user's homepage with a group forum.
- Tested Cases:
- Request to get homepage posts for a user with a group forum and specific sorting criteria.
- Expected Outcome: A list containing homepage posts for the specified user should be returned, considering the group forum and sorting criteria.
Test Case: Retrieving Homepage Posts for a Guest User
- Functionality Tested: Retrieving posts for a guest user's homepage based on filtering criteria.
- Tested Cases:
- Request to get homepage posts for a guest user with valid data.
- Expected Outcome: A list containing homepage posts for a guest user should be returned.
Test Case: Retrieving Homepage Posts for a Guest User with Group Forum
- Functionality Tested: Retrieving posts for a guest user's homepage with a group forum.
- Tested Cases:
- Request to get homepage posts for a guest user with a group forum and specific sorting criteria.
- Expected Outcome: A list containing homepage posts for a guest user should be returned, considering the group forum and sorting criteria.
Test Case: Handling User Not Found Exception
- Functionality Tested: Handling the scenario when the user is not found during the retrieval of homepage posts.
- Tested Cases:
- Request to get homepage posts for a user, but the user is not found.
- Expected Outcome: A ResourceNotFoundException should be thrown when the user is not found.
Test Case: Retrieving Homepage Posts for a Guest User
- Functionality Tested: Retrieving homepage posts for a guest user.
- Tested Cases:
- Request to get homepage posts for a guest user without a user ID.
- Expected Outcome: Homepage posts for a guest user should be retrieved without interacting with the user repository.
Test Case: Retrieving All Votes
- Functionality Tested: Retrieving all votes based on filter criteria.
- Tested Cases:
- Request to get all votes with a specific filter.
- Expected Outcome: A list containing all votes based on the filter criteria should be returned.
Test Case: Retrieving a Vote by ID
- Functionality Tested: Retrieving a vote by its unique identifier.
- Tested Cases:
- Request to get a vote by a specific ID.
- Request to get a vote with a non-existing ID (Not Found).
- Expected Outcome: The vote with the specified ID should be returned. If the vote ID does not exist, a ResourceNotFoundException should be thrown.
Test Case: Adding a Vote
- Functionality Tested: Adding a new vote.
- Tested Cases:
- Request to add a vote with valid data.
- Request to add a vote for a review, comment, and post with different scenarios.
- Expected Outcome: The vote should be successfully added and returned. Additional scenarios for adding votes for different types (review, comment, post) should be considered.
Test Case: Handling Resource Not Found Exception on Adding a Vote
- Functionality Tested: Handling the scenario when the resource for which the vote is being added is not found.
- Tested Cases:
- Request to add a vote for a non-existing resource.
- Expected Outcome: A ResourceNotFoundException should be thrown when the resource is not found.
Test Case: Deleting a Vote
- Functionality Tested: Deleting an existing vote.
- Tested Cases:
- Request to delete a vote with a valid ID.
- Request to delete a non-existing vote (Not Found).
- Expected Outcome: The vote should be successfully deleted, and a boolean result should be returned. If the vote ID does not exist, a ResourceNotFoundException should be thrown.
Test Case: Handling Resource Not Found Exception on Deleting a Vote
- Functionality Tested: Handling the scenario when the vote to be deleted is not found.
- Tested Cases:
- Request to delete a non-existing vote.
- Expected Outcome: A ResourceNotFoundException should be thrown when the vote is not found.
Test Case 1: testCreateCharacterWithValidData
- Functionality Tested: Creating a character with valid data.
- Tested Cases:
- Valid game ID provided.
- Expected Outcome: The character should be successfully created.
Test Case 2: testCreateCharacterWithEmptyGames
- Functionality Tested: Handling the case when the games list is empty.
- Tested Cases:
- Empty games list provided.
- Expected Outcome: BadRequestException should be thrown.
Test Case 3: testCreateCharacterWithNonExistentGame
- Functionality Tested: Handling the case when the specified game doesn't exist.
- Tested Cases:
- Non-existent game ID provided.
- Expected Outcome: ResourceNotFoundException should be thrown.
Test Case 4: testCreateCharacterWithNullRequest
- Functionality Tested: Handling the case when the request is null.
- Tested Cases:
- Null request provided.
- Expected Outcome: NullPointerException should be thrown.
Test Case 5: testUpdateCharacterWithValidData
- Functionality Tested: Updating a character with valid data.
- Tested Cases:
- Valid character ID and valid update request.
- Expected Outcome: The character should be successfully updated.
Test Case 6: testUpdateCharacterWithValidBlankData
- Functionality Tested: Updating a character with valid blank data.
- Tested Cases:
- Valid character ID and update request with blank fields.
- Expected Outcome: The character should be successfully updated.
Test Case 7: testUpdateCharacterNonExistentCharacter
- Functionality Tested: Handling the case when the specified character doesn't exist.
- Tested Cases:
- Non-existent character ID provided.
- Expected Outcome: ResourceNotFoundException should be thrown.
Test Case 8: testUpdateCharacterWithBlankName
- Functionality Tested: Handling the case when the updated character has a blank name.
- Tested Cases:
- Blank name provided in the update request.
- Expected Outcome: BadRequestException should be thrown.
Test Case 9: testUpdateCharacterWithBlankIcon
- Functionality Tested: Handling the case when the updated character has a blank icon.
- Tested Cases:
- Blank icon provided in the update request.
- Expected Outcome: BadRequestException should be thrown.
Test Case 10: testUpdateCharacterWithBlankDescription
- Functionality Tested: Handling the case when the updated character has a blank description.
- Tested Cases:
- Blank description provided in the update request.
- Expected Outcome: BadRequestException should be thrown.
Test Case 11: testUpdateCharacterWithEmptyGamesList
- Functionality Tested: Handling the case when the updated character has an empty games list.
- Tested Cases:
- Empty games list provided in the update request.
- Expected Outcome: BadRequestException should be thrown.
Test Case 12: testUpdateCharacterWithNonExistentGame
- Functionality Tested: Handling the case when the updated character has a non-existent game in the games list.
- Tested Cases:
- Non-existent game ID provided in the update request.
- Expected Outcome: ResourceNotFoundException should be thrown.
Test Case 13: testUpdateCharacterWithNullRequest
- Functionality Tested: Handling the case when the update request is null.
- Tested Cases:
- Null update request provided.
- Expected Outcome: NullPointerException should be thrown.
Test Case 14: testDeleteCharacterWithValidId
- Functionality Tested: Deleting a character with a valid ID.
- Tested Cases:
- Valid character ID provided.
- Expected Outcome: The character should be marked as deleted.
Test Case 15: testDeleteNonExistentCharacter
- Functionality Tested: Handling the case when the specified character doesn't exist.
- Tested Cases:
- Non-existent character ID provided.
- Expected Outcome: ResourceNotFoundException should be thrown.
Test Case 16: testDeleteCharacterAlreadyDeleted
- Functionality Tested: Handling the case when trying to delete an already deleted character.
- Tested Cases:
- Character with "isDeleted" flag set to true.
- Expected Outcome: ResourceNotFoundException should be thrown.
Test Case 17: testGetGameCharactersWithValidGameId
- Functionality Tested: Retrieving characters for a valid game ID.
- Tested Cases:
- Valid game ID provided.
- Expected Outcome: List of characters for the specified game should be returned.
Test Case 18: testGetGameCharactersWithNonExistentGameId
- Functionality Tested: Handling the case when the specified game doesn't exist.
- Tested Cases:
- Non-existent game ID provided.
- Expected Outcome: ResourceNotFoundException should be thrown.
Test Case 1: testGetNotificationList
- Functionality Tested: Retrieving a list of notifications based on the provided filter.
- Tested Cases:
- Filtering notifications by unread status.
- Expected Outcome: The list of notifications matching the filter should be returned.
Test Case 2: testGetNotificationListWithNullFilter
- Functionality Tested: Retrieving all notifications when the filter is null.
- Tested Cases:
- Null filter provided.
- Expected Outcome: All notifications for the specified user should be returned.
Cmpe 352
Cmpe 451
Cmpe 352
Milestone 1
Final Milestone
Milestone 1
Milestone 2
Final Milestone
- Authentication Mockup
- Forum Mockup
- Game Reviews Mockup
- Games Page Mockup
- Group Page Mockup
- Home Page Mockup
- Profile Page Mockup
- Unregistered User Scenario: Sign Up
- Unregistered User Scenario: Search for a Game and Browse the Game Forum
- Registered User Scenario: Create Post in a Game Forum
- Registered User Scenario: Search For Groups and Join A Group
📝 RAM
- Issue Template
- Personal Information Template
- Meeting Note Template
- Contributions Template
- API Documentation Template
API Documentation for Practice App
- Top Games
- Yugioh Card
- Hearthstone Card
- Games By User
- Game Reviews
- Games By Genre
- Games By Category
- Game Suggestions
- Esport Tournaments
- Achievement By Game Id
- Rock Paper Scissors
- Game By Deal