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

Usage of EasyMock in Skript tests (Create fake objects like Players) #5033

Closed
TheLimeGlass opened this issue Aug 15, 2022 · 0 comments
Closed
Labels
completed The issue has been fully resolved and the change will be in the next Skript update. enhancement Feature request, an issue about something that could be improved, or a PR improving something. priority: lowest "Nice to have" updates that are not required (tiny low impact bug fixes or QoL enhancements). unit testing For issues/PRs related to the Skript unit testing system.

Comments

@TheLimeGlass
Copy link
Collaborator

TheLimeGlass commented Aug 15, 2022

Suggestion

Skript used to use a library called EasyMock. This library essentially allowed Skript to create fake objects to be used in tests. Things like Player objects with written fake field values.

I have added EasyMock back into Skript in my JUnit pull request at #4979 which will allow for JUnit Java code tests to use EasyMock in their written tests.

This suggestion (or more so a reminder for me) is to add some syntaxes to allow Skript side tests to utilize this library.

Why?

This will help us cover tests that involve runtime testing like Player related events, an entity class related syntax, a block class related syntax like spawner events, etc.

Looking for syntax ideas

If you have any syntax ideas, you can post them in this issue and i'll look at them when I go to start on this. Please consider the EasyMock API when coming up with syntaxes.

@TheLimeGlass TheLimeGlass self-assigned this Aug 15, 2022
@TheLimeGlass TheLimeGlass added priority: lowest "Nice to have" updates that are not required (tiny low impact bug fixes or QoL enhancements). feature Pull request adding a new feature. unit testing For issues/PRs related to the Skript unit testing system. enhancement Feature request, an issue about something that could be improved, or a PR improving something. and removed feature Pull request adding a new feature. labels Aug 15, 2022
@TheLimeGlass TheLimeGlass added the PR available Issues which have a yet-to-be merged PR resolving it label Dec 28, 2022
@TheLimeGlass TheLimeGlass added completed The issue has been fully resolved and the change will be in the next Skript update. and removed PR available Issues which have a yet-to-be merged PR resolving it labels Mar 8, 2023
@TheLimeGlass TheLimeGlass removed their assignment Mar 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
completed The issue has been fully resolved and the change will be in the next Skript update. enhancement Feature request, an issue about something that could be improved, or a PR improving something. priority: lowest "Nice to have" updates that are not required (tiny low impact bug fixes or QoL enhancements). unit testing For issues/PRs related to the Skript unit testing system.
Projects
None yet
Development

No branches or pull requests

1 participant