First test rdy
This commit is contained in:
@@ -7,10 +7,11 @@
|
||||
|
||||
#include "../catch.hpp"
|
||||
#include "../fakeit.hpp"
|
||||
#include "../../src/utilities/LoggerFactory.hpp"
|
||||
|
||||
// testing purposes
|
||||
#define private public
|
||||
|
||||
#include "../../src/utilities/LoggerFactory.hpp"
|
||||
#include "../../src/input/InputDriver.h"
|
||||
|
||||
#include "../../src/input/IEventNotifier.h"
|
||||
@@ -21,7 +22,7 @@ using namespace fakeit;
|
||||
|
||||
SCENARIO("An InputDriver gets created", "[construction}")
|
||||
{
|
||||
GIVEN("An EventNotifier")
|
||||
GIVEN("An EventNotifier and a Detector")
|
||||
{
|
||||
LoggerFactory::CreateInputLogger();
|
||||
|
||||
@@ -32,14 +33,14 @@ SCENARIO("An InputDriver gets created", "[construction}")
|
||||
Fake(Dtor(event_notifier_mock));
|
||||
Mock<IEventHandler> event_handler_mock;
|
||||
Fake(Dtor(event_handler_mock));
|
||||
|
||||
WHEN("The InputDriver gets created")
|
||||
{
|
||||
Input::InputDriver input_driver(&event_notifier_mock.get(), &detector_mock.get());
|
||||
|
||||
THEN("It saved the EventNotifier")
|
||||
THEN("It saves the EventNotifier and the Detector")
|
||||
{
|
||||
REQUIRE(input_driver.event_notifier == &event_notifier_mock.get());
|
||||
REQUIRE(input_driver.detector == &detector_mock.get());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user