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

Unit testing #151

Open
MattSturgeon opened this issue Jan 6, 2024 · 0 comments · May be fixed by #153
Open

Unit testing #151

MattSturgeon opened this issue Jan 6, 2024 · 0 comments · May be fixed by #153
Assignees
Labels
enhancement New feature or request

Comments

@MattSturgeon
Copy link
Member

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.

@MattSturgeon MattSturgeon linked a pull request Jan 6, 2024 that will close this issue
@MattSturgeon MattSturgeon added the enhancement New feature or request label Jan 9, 2024
@MattSturgeon MattSturgeon self-assigned this Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant