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 Test: Mock, instead of using proxy #245

Open
boholder opened this issue Jan 20, 2024 · 0 comments
Open

Unit Test: Mock, instead of using proxy #245

boholder opened this issue Jan 20, 2024 · 0 comments
Labels
refactor To reduce technical debt

Comments

@boholder
Copy link
Collaborator

Mockito has a way to create an instance of a class without calling its constrcutor.
Let's see if we can delete shallow proxies and mock minecraft code directly.

https://github.com/FabricMC/fabric/blob/1.20.4/fabric-data-attachment-api-v1/src/test/java/net/fabricmc/fabric/test/attachment/CommonAttachmentTests.java#L81

@boholder boholder added the refactor To reduce technical debt label Jan 20, 2024
@boholder boholder changed the title Mock, instead of using proxy Unit Test: Mock, instead of using proxy Jan 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor To reduce technical debt
Projects
None yet
Development

No branches or pull requests

1 participant