-
-
Notifications
You must be signed in to change notification settings - Fork 26.6k
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
Add CRTP pattern Ref: #2342 #2580
Conversation
crtp/README.md
Outdated
--- | ||
title: Curiously Recurring Template Pattern | ||
language: en | ||
--- |
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.
check out the required yaml frontmatter at https://github.com/iluwatar/java-design-patterns/wiki/01.-How-to-contribute
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.
I've updated the frontmatter adding category and tag fields
* | ||
* @param <T> MmaFighter derived class that uses itself as type parameter. | ||
*/ | ||
@Slf4j |
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.
Check out for what else you can use Lombok for e.g. generate constructor, toString etc.
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.
I replaced the constructor and toString() in MmaFighter with @DaTa annotation
@Test | ||
void shouldExecuteApplicationWithoutException() { | ||
assertDoesNotThrow(() -> App.main(new String[]{})); | ||
} |
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.
This is the only test? I think it's not sufficient.
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.
There's a new test in FightTest.java file
Kudos, SonarCloud Quality Gate passed! |
Looks good! Thank you for the contribution 🎉 @all-contributors please add @AddeusExMachina for code |
I couldn't determine any contributions to add, did you specify any contributions? I've put up a pull request to add @AddeusExMachina! 🎉 |
Add crtp directory containing source code and documentation for the curiously recurring template pattern