Closed thecadorn closed 2 years ago
Thanks, seems good. The only suggestion I have is to initialize the Mock object attributes, otherwise they might be uninitialized.
Thanks for the suggestion! Changes made.
Cool, thanks for the contribution. Are you gonna add stdlib tests as well?
Natives which have some visible effect are mocked out (QuestSetCompleted, IsQuestCompleted, etc...). Others are just no-ops.
I couldn't find prior examples of how to test mocks for their correctness, so no unit tests are added to the repository. These changes were manually test with a local rebuild of the repository and running Wurstscript unit tests that rely on the mocks being available. The tests fail at HEAD and succeed with these changes.
Also didn't see a style guide, and Java is not my primary language. Suggestions are welcome!