Skip to content

Unit testing class with CommandManager as a member? (NoClassDefFoundError) #334

Open
@leviem1

Description

@leviem1

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcoreRelated to the ACF CorepaperRelated to the ACF Paper Implementation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions