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 class with CommandManager as a member? (NoClassDefFoundError) #334

Open
leviem1 opened this issue Jul 5, 2021 · 0 comments
Labels
bug core Related to the ACF Core paper Related to the ACF Paper Implementation

Comments

@leviem1
Copy link

leviem1 commented Jul 5, 2021

I'm trying to unit test a class that wraps a CommandManager. I can't inject a mock CommandManager object into the object I'm testing as CommandManager#log() uses LogLevel which is package private, so I can't implement it. Also, PaperCommandManager throws java.lang.NoClassDefFoundError: it/unimi/dsi/fastutil/ints/Int2ObjectOpenHashMap at runtime, so I can't just mock the objects it uses.

Any help would be much appreciated. I think this could be resolved by making LogLevel protected or public. Thanks for the amazing library, helped me more than you could imagine.

@chickeneer chickeneer added bug core Related to the ACF Core paper Related to the ACF Paper Implementation labels Jun 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug core Related to the ACF Core paper Related to the ACF Paper Implementation
Projects
None yet
Development

No branches or pull requests

2 participants