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

Package manager tests #75

Merged
merged 3 commits into from Feb 4, 2018

Conversation

anthonyflynn
Copy link
Contributor

Fixing #72 for the primary method in PackageManager.
Altering the equals method of Package for testing value equality.

@codecov-io
Copy link

codecov-io commented Feb 3, 2018

Codecov Report

Merging #75 into master will increase coverage by 3.78%.
The diff coverage is 50%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #75      +/-   ##
============================================
+ Coverage     62.57%   66.36%   +3.78%     
- Complexity      123      130       +7     
============================================
  Files            24       24              
  Lines           660      663       +3     
  Branches         65       66       +1     
============================================
+ Hits            413      440      +27     
+ Misses          216      189      -27     
- Partials         31       34       +3
Impacted Files Coverage Δ Complexity Δ
src/se/vidstige/jadb/managers/Package.java 55.55% <50%> (+55.55%) 2 <1> (+2) ⬆️
src/se/vidstige/jadb/managers/PackageManager.java 36.06% <0%> (+36.06%) 5% <0%> (+5%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 39dc7ee...23bfd4b. Read the comment docs.

@vidstige
Copy link
Owner

vidstige commented Feb 4, 2018

great, thank you for submitting this pr and contributing to the project!

if (!name.equals(that.name)) return false;

return true;
}
Copy link
Owner

Choose a reason for hiding this comment

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

Only very few parts of this function is tested, I think thats why codecov bails out. Are all these checks really needed? Specifically, the check for class equality will cause problems in case someone subclasses Package, right? Also the last two statements can just be written as

return name.equals(that.name);

To avoid a branch that would otherwise need to be tested.

Copy link
Owner

Choose a reason for hiding this comment

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

Also on line 26 there is a bit too much whitespace. I think just dropping this change is the easiest way to get the tests to pass.

Copy link
Owner

@vidstige vidstige left a comment

Choose a reason for hiding this comment

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

looks great, but let's get build green first 🍏

@vidstige
Copy link
Owner

vidstige commented Feb 4, 2018

hmm, codecov/path still fails, but 🤷‍♂️

thank you very much! And congrats to first pr. 🎉

@vidstige vidstige merged commit f9cfdfa into vidstige:master Feb 4, 2018
@anthonyflynn
Copy link
Contributor Author

Was just writing a message. Thanks for sharing your project :)

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.

None yet

3 participants