made some stuff working 😠 @Jonas
This commit is contained in:
@@ -8,14 +8,13 @@
|
||||
#include "catch.hpp"
|
||||
#include "fakeit.hpp"
|
||||
|
||||
#include "utility/LoggerFactory.h"
|
||||
#include "input/EventHandler.h"
|
||||
#include "input/IInputDriver.h"
|
||||
|
||||
|
||||
// testing purposes
|
||||
#define private public
|
||||
|
||||
#include "utility/LoggerFactory.h"
|
||||
#include "input/detail/EventHandler.h"
|
||||
#include "input/InputDriver.h"
|
||||
|
||||
|
||||
using namespace fakeit;
|
||||
using namespace flippR_driver::utility;
|
||||
@@ -26,15 +25,15 @@ SCENARIO("An EventHandler gets created", "[construction}")
|
||||
{
|
||||
LoggerFactory::CreateInputTestLogger();
|
||||
|
||||
Mock<flippR_driver::input::IInputDriver> input_driver_mock;
|
||||
Mock<flippR_driver::input::InputDriver> input_driver_mock;
|
||||
Fake(Dtor(input_driver_mock));
|
||||
When(Method(input_driver_mock, register_event_handler)).AlwaysReturn();
|
||||
When(Method(input_driver_mock, unregister_event_handler)).AlwaysReturn();
|
||||
|
||||
WHEN("the event handler gets created")
|
||||
{
|
||||
std::shared_ptr<flippR_driver::input::IInputDriver> driver_ptr(&input_driver_mock.get());
|
||||
flippR_driver::input::EventHandler handler(driver_ptr);
|
||||
std::shared_ptr<flippR_driver::input::InputDriver> driver_ptr(&input_driver_mock.get());
|
||||
flippR_driver::input::detail::EventHandler handler(driver_ptr);
|
||||
|
||||
THEN("It should register itself at the input_driver")
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user