changed to smart ptrs and trying to fix event_handler_tests
This commit is contained in:
@@ -63,13 +63,13 @@ SCENARIO("An EventHandler gets [un]registered at the notifier", "[un-register no
|
||||
|
||||
AND_WHEN("The EventHandler gets unregistered at the driver")
|
||||
{
|
||||
REQUIRE(!notifier.event_handler.empty());
|
||||
REQUIRE(!notifier.event_handlers.empty());
|
||||
|
||||
notifier.unregister_event_handler(&event_handler_mock.get());
|
||||
|
||||
THEN("The list of event_handlers is empty")
|
||||
{
|
||||
REQUIRE(notifier.event_handler.empty());
|
||||
REQUIRE(notifier.event_handlers.empty());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -86,6 +86,7 @@ SCENARIO("An event should be distributed", "[distribute]")
|
||||
|
||||
Mock<IBlockingQueue<Event>> queue_mock;
|
||||
When(Method(queue_mock, push)).AlwaysReturn();
|
||||
When(Method(queue_mock, pop)).AlwaysDo([](){return Event(0,0,"mock");});
|
||||
Fake(Dtor(queue_mock));
|
||||
|
||||
EventNotifier notifier;
|
||||
|
||||
Reference in New Issue
Block a user