You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Minecraft is a bit of a pain for unit tests, you can't easily pluck out a single class without first initializing the rest of the game.
That said, starting to add unit tests will make it easier to make changes more confidently, and make it easier to update to new versions/maintain multiple versions.
Long term, we'll end up improving the code base by refactoring classes to be more "testable", but initially we can start by just getting JUnit setup and testing the low hanging fruit like FreecamPosition.
I'm not sure what options are available to help setup tests and mock Minecraft classes. I've seen this, but it only targets older versions of the game.
The text was updated successfully, but these errors were encountered:
Minecraft is a bit of a pain for unit tests, you can't easily pluck out a single class without first initializing the rest of the game.
That said, starting to add unit tests will make it easier to make changes more confidently, and make it easier to update to new versions/maintain multiple versions.
Long term, we'll end up improving the code base by refactoring classes to be more "testable", but initially we can start by just getting JUnit setup and testing the low hanging fruit like
FreecamPosition
.I'm not sure what options are available to help setup tests and mock Minecraft classes. I've seen this, but it only targets older versions of the game.
The text was updated successfully, but these errors were encountered: