-
-
Notifications
You must be signed in to change notification settings - Fork 27k
Object Mother pattern #498 #503
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
Conversation
Add a simple king and queen classes which implement the behaviour of the royalty interface. Also wrote the object mother of royalty objects which is final so you can just call the static methods in it to create objects with a specific state to use them fast in tests. The tests are already created for testing the behaviour and the type of the objects which are created by the object mother. I also created the UML diagrams via object aid and updated the readme.
The |
|
||
@Test | ||
public void queenIsBlockingFlirtCauseDrunkKing() { | ||
King soberUnhappyKing = RoyaltyObjectMother.createDrunkKing(); |
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.
Confusing naming here
|
||
@Test | ||
public void queenIsBlockingFlirt() { | ||
King soberUnhappyKing = RoyaltyObjectMother.createHappyKing(); |
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.
Confusing naming here
|
||
@Test | ||
public void successfullKingFlirt() { | ||
King soberUnhappyKing = RoyaltyObjectMother.createHappyKing(); |
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.
Confusing naming here
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.
@igeligel you have my review comments. Just a couple of minor mistakes found. Please fix them and the pattern is ready for merging.
Deleted </modules> tag because i added it one time more than neccessary
@igeligel is this ready for another review? |
Yeah, i have messed up the pom.xml at some commit but fixed it then. I also renamed the code parts where you wanted a change. |
Looks good @igeligel. Thanks for the contribution! |
Added the object mother pattern and all diagrams to the context.