You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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? 😃
The text was updated successfully, but these errors were encountered:
The
fn process(&self, events: Events, ops: &mut EventOps)
function oftrait (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 intoprocess()
becauseEventOps
doesn't have any public constructors, and such objects are only built byevent-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 realEventOps
object also contains other internal/non-public members so we can't just stick a public constructor and be done with it...Any ideas? 😃
The text was updated successfully, but these errors were encountered: