Skip to content

feature: provide some sort of mock "EventOps" for unit-testing #67

@acatangiu

Description

@acatangiu

The fn process(&self, events: Events, ops: &mut EventOps) function of trait (Mut)EventSubscriber contains the core event-handling logic of any user or this crate.

It would be nice to be able to unit-test it and cover that critical functionality.

Currently, the EventOps reference prevents any outside/test calls into process() because EventOps doesn't have any public constructors, and such objects are only built by event-manager crate-internal code.

I don't have a clear idea right now on what would be the best way to allow unit-testing process(); the real EventOps object also contains other internal/non-public members so we can't just stick a public constructor and be done with it...

Any ideas? 😃

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions