Skip to content
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

TG-5586 Add unit tests for com.github.theholywaffle.teamspeak3.commands.FileCommands #1

Conversation

JohnLBergqvist
Copy link

@JohnLBergqvist JohnLBergqvist commented Jan 15, 2019

Hi,
I've analysed your codebase and seen some gaps in the coverage of commands.FileCommands.
I've written tests for these functions with the help of Diffblue Cover.
Hopefully, these tests should help you detect regressions caused by future code changes.

@JohnLBergqvist JohnLBergqvist self-assigned this Jan 15, 2019
@JohnLBergqvist JohnLBergqvist force-pushed the Add-unit-tests-for-com.github.theholywaffle.teamspeak3.commands.FileCommands branch 5 times, most recently from 702285e to 4ff801f Compare January 16, 2019 09:54
Copy link

@sudo-jaa sudo-jaa left a comment

Choose a reason for hiding this comment

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

Flawless 👍
Which tests did you write yourself? I can't even tell. :D

Copy link

@paulkennethkent paulkennethkent left a comment

Choose a reason for hiding this comment

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

New line

@JohnLBergqvist JohnLBergqvist force-pushed the Add-unit-tests-for-com.github.theholywaffle.teamspeak3.commands.FileCommands branch from 4ff801f to 255bb95 Compare January 16, 2019 11:50
These tests were written using Diffblue Cover.
Dependencies required to run the tests have also been added.
Copy link

@peterschrammel peterschrammel left a comment

Choose a reason for hiding this comment

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

Looks neat. What's the coverage on this class?

@JohnLBergqvist
Copy link
Author

@peterschrammel Everything apart from the private method (1 line). I've heavily re-wrote these (flattening the declarations where possible), and the stuff I added from scratch was basically every test that doesn't throw an exception. And I've had to use the .toString method to check that the object returned by the function was created (as that class has no .equals or other getters I could use).

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.

6 participants