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

Test all constructors that do not contain generics in AutoEqualityTest. #409

Merged
merged 2 commits into from
Feb 8, 2024

Conversation

mvanaken
Copy link
Contributor

@mvanaken mvanaken commented Feb 8, 2024

Ok, het mysterie is ontrafelt!

GitHub: Je build is groen!
Codecov: Maar geen 100% coverage, je mist equality checks!
IntelliJ: Onzin! Die worden gewoon gecheckt! 100%, behalve dan de Source interface.
CodeCov: Source interface? Die wordt veelvuldig gebruikt en getest waar heb je het over? Die equalities zijn het probleem!
IntelliJ: AutoEqualityTest runt gewoon volledig! Ik snap niet waar je het over hebt! Waarom denk jij dat ze missen?
CodeCov: Weet ik veel! Ze missen gewoon!

que Maven

Maven: Oh, releasen?! Nee, je AutoEqualityTest faalt... Je moet een mapping toevoegen voor Map object.
CodeCov: Ha!
IntelliJ: Huh? Maar de build is groen?!
GitHub: Laat mij erbuiten!
IntelliJ: En ik heb helemaal geen Map object nodig om de volledig test te kunnen runnen. Java geeft mij geen enkele constructor terug met een Map parameter!

que Java

Java: You called?
IntelliJ: Welke constructors ben je wanneer aan het geven?
Java: Oh, gewoon in een volgorde die ik leuk vind!
IntelliJ: ...
Java: Niet goed?
CodeCov: Ik heb dus gelijk dat equality checks missen! :D
IntelliJ: Je kon alleen niet zeggen waarom!
CodeCov: Dat is mijn werk niet!
IntelliJ: ...

THE END

Let's get our 100% coverage back!

Copy link

codecov bot commented Feb 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (ddf0add) 92.31% compared to head (6cc8d51) 100.00%.

Additional details and impacted files
@@              Coverage Diff              @@
##             master      #409      +/-   ##
=============================================
+ Coverage     92.31%   100.00%   +7.68%     
- Complexity     1014      1153     +139     
=============================================
  Files            99        99              
  Lines          1536      1536              
  Branches        157       157              
=============================================
+ Hits           1418      1536     +118     
+ Misses           89         0      -89     
+ Partials         29         0      -29     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mvanaken mvanaken linked an issue Feb 8, 2024 that may be closed by this pull request
Copy link
Contributor

@rdvdijk rdvdijk left a comment

Choose a reason for hiding this comment

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

Looks good! Just some missing finals.

}
args.add(mapping.get(cl));
}
List<List<Supplier<Object>>> argLists = generateCombinations(0, args);
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this be final?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

}
List<List<Supplier<Object>>> argLists = generateCombinations(0, args);
List<Object> otherInstances = new ArrayList<>();
for (List<Supplier<Object>> argList : argLists.subList(1, argLists.size())) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Another missing final here.

Suggested change
for (List<Supplier<Object>> argList : argLists.subList(1, argLists.size())) {
for (final List<Supplier<Object>> argList : argLists.subList(1, argLists.size())) {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

Copy link
Collaborator

@Carly-1 Carly-1 left a comment

Choose a reason for hiding this comment

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

Nice :)

Copy link
Contributor

@jvdb jvdb left a comment

Choose a reason for hiding this comment

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

👍🏻

@mvanaken mvanaken merged commit 5112d2b into master Feb 8, 2024
10 checks passed
@mvanaken mvanaken deleted the #408_auto_equality_multiple_constructors branch April 12, 2024 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Test all constructors in AutoEqualityTest
4 participants