fixed some testing bugs
This commit is contained in:
@@ -55,15 +55,16 @@ SCENARIO("Creating a Detector object", "")
|
||||
Detector detector(&gpio_interface_mock.get(), events, &event_notifier_mock.get());
|
||||
THEN("a thread should be created")
|
||||
{
|
||||
REQUIRE(typeid(detector.detect_thread).hash_code() == typeid(std::thread).hash_code());
|
||||
REQUIRE(typeid(detector.detect_thread).hash_code() == typeid(std::thread).hash_code());
|
||||
}
|
||||
|
||||
AND_WHEN("an event can be found at gpio interface")
|
||||
{
|
||||
THEN("only the fitting event should be distributed by event notifier")
|
||||
{
|
||||
REQUIRE((bool)Verify(Method(event_notifier_mock, distribute_event).Using(event2)));
|
||||
}
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(50));
|
||||
THEN("only the fitting event should be distributed by event notifier")
|
||||
{
|
||||
REQUIRE((bool)Verify(Method(event_notifier_mock, distribute_event).Using(event2)));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user