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

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

Open
acatangiu opened this issue Jun 2, 2021 · 0 comments
Open

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

acatangiu opened this issue Jun 2, 2021 · 0 comments

Comments

@acatangiu
Copy link

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? 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant