finishing inputgpiointerface
This commit is contained in:
@@ -36,7 +36,7 @@ SCENARIO("Creating a Detector object", "")
|
||||
Mock<IInputGPIOInterface> gpio_interface_mock;
|
||||
|
||||
Fake(Dtor(gpio_interface_mock));
|
||||
When(Method(gpio_interface_mock, read_input_data)).AlwaysReturn(false);
|
||||
When(Method(gpio_interface_mock, read_data)).AlwaysReturn(false);
|
||||
|
||||
Fake(Dtor(event_notifier_mock));
|
||||
When(Method(event_notifier_mock, distribute_event)).AlwaysReturn();
|
||||
@@ -64,7 +64,7 @@ SCENARIO("There are events at the input", "")
|
||||
Mock<IInputGPIOInterface> gpio_interface_mock;
|
||||
|
||||
Fake(Dtor(gpio_interface_mock));
|
||||
When(Method(gpio_interface_mock, read_input_data)).AlwaysDo([](char c){return c==2;});
|
||||
When(Method(gpio_interface_mock, read_data)).AlwaysDo([](char c){return c==2;});
|
||||
|
||||
Fake(Dtor(event_notifier_mock));
|
||||
When(Method(event_notifier_mock, distribute_event)).AlwaysReturn();
|
||||
@@ -104,7 +104,7 @@ SCENARIO("There are events at the input but no suitable event in map", "")
|
||||
Mock<IInputGPIOInterface> gpio_interface_mock;
|
||||
|
||||
Fake(Dtor(gpio_interface_mock));
|
||||
When(Method(gpio_interface_mock, read_input_data)).AlwaysDo([](char c){return c==4;});
|
||||
When(Method(gpio_interface_mock, read_data)).AlwaysDo([](char c){return c==4;});
|
||||
|
||||
Fake(Dtor(event_notifier_mock));
|
||||
When(Method(event_notifier_mock, distribute_event)).AlwaysReturn();
|
||||
|
||||
Reference in New Issue
Block a user