-
-
Notifications
You must be signed in to change notification settings - Fork 93
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 doubles #388
Test doubles #388
Conversation
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.
Thank you for your PR! Please address the minor issues I mentioned in my review before I can merge.
this.getControllers().addController(controller); | ||
if (Game.world().environment() != null && Game.world().environment().isLoaded()) { | ||
Game.loop().attach(controller); | ||
} | ||
} | ||
|
||
protected IEntityAnimationController<?> createAnimationController() { |
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.
what's the reason for removing createAnimationController
and createMovementController
?
tests/de/gurkenlabs/litiengine/environment/EntitySpawnerTests.java
Outdated
Show resolved
Hide resolved
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.
Now, everything looks fine. Thank you!
This PR causes build failures on Java 8. @ddreimane @jluech @ddreimane @niels89 @nightm4re94
|
Resolved by 44d2eb6. |
Thanks @nightm4re94! Would not have had time to look at it properly until Thursday at least. Your commit did introduce some wildcard imports on Mockito, though 😉 and it changed some test method visibility to package-private, I assume that was on purpose. |
Damn you, IntelliJ! 🗡️ The wildcard import was not on purpose, of course. To configure IntelliJ the right way, see this answer. Since JUnit5, Test classes, test methods, and lifecycle methods are no longer required to be |
Testing using test doubles, in particular, test cases that make use of any mocks, spies, fakes, etc.