-
Notifications
You must be signed in to change notification settings - Fork 0
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
Server unit tests #39
Merged
Merged
Conversation
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
Zargess
force-pushed
the
server-unit-tests
branch
2 times, most recently
from
November 24, 2024 21:31
75b6e59
to
c323704
Compare
* Testing request types ** GetAllConversationDataRequest ** GetConversationsRequest ** UpdateHistoryRequests ** UpdateHistoryRequests ** DeleteFriendRequests ** DeleteFriendRequests ** LogoutRequests ** UpdateHistoryRequests ** SearchUsersRequests ** UserNameAvailableRequests * Made AddParticipantRequest tests verify users gets the conversation id * Made some utility functions for testing * Removed print statements * Made sure that responses of requests are tested * Deleted unused libraries * Removed build.bat file * Removed external libraries, run and build shell scripts * Installed pitest plugin * Improved tests with the help of pitest
Now testing that the threading parts of ConversationHandler works
miniwolf
force-pushed
the
server-unit-tests
branch
from
November 24, 2024 21:41
c323704
to
096204d
Compare
miniwolf
reviewed
Nov 24, 2024
fagiServer/src/test/java/com/fagi/handler/inputhandler/UserNameAvailableRequestTest.java
Outdated
Show resolved
Hide resolved
miniwolf
reviewed
Nov 24, 2024
fagiServer/src/test/java/com/fagi/mockhelpers/ConversationMocks.java
Outdated
Show resolved
Hide resolved
miniwolf
reviewed
Nov 24, 2024
miniwolf
reviewed
Nov 24, 2024
miniwolf
reviewed
Nov 24, 2024
miniwolf
requested changes
Nov 24, 2024
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.
Småting:
- Base Class til InputHandler
- Spørgsmål omkring timeout i test
- Unøddigt brug af library
* Introduced a Base InputHandler test class to handle the common setup and have useful helper functions * Put a timeout on a TextMessageIntegrationTest such that it can be cancelled if it takes too long * Put a todo with link to the trello task that will fix the username vulnerability * Removed dependency only used for testing and implemented a helper function that provides the needed test functionality
Applied code style to test classes
miniwolf
approved these changes
Dec 1, 2024
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.
Fix the formatting issues and then let's get it in.
Removed @mock annotation
Removed unused MockitoExtension and Mockito strictness
Removed unused MockitoExtension
Removed Captor annotation as we no longer MockitoExtension
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Testing
Ensured 100% test and pitest coverage of InputHandler and ConversationHandler
Pitest
Introduced pitest on the server to help improve the tests we write
Removed old unused jar files
I have removed the old jar files we used as dependencies to as we now use gradle and maven for dependencies