diff --git a/libs/RobotKit/tests/RobotController_test_hardware.cpp b/libs/RobotKit/tests/RobotController_test_hardware.cpp index 26f1ef095e..e20a976afb 100644 --- a/libs/RobotKit/tests/RobotController_test_hardware.cpp +++ b/libs/RobotKit/tests/RobotController_test_hardware.cpp @@ -3,6 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 #include "./RobotController_test.h" +#include "mocks/leka/DeepSleepEnabled.h" TEST_F(RobotControllerTest, stopActuators) { @@ -32,18 +33,12 @@ TEST_F(RobotControllerTest, stopActuatorsAndLcd) TEST_F(RobotControllerTest, suspendHardwareForDeepSleep) { - EXPECT_CALL(mock_motor_left, enableDeepSleep); - EXPECT_CALL(mock_motor_right, enableDeepSleep); - EXPECT_CALL(mock_lcd, enableDeepSleep); - // TODO: Expect_call of RFID - - auto components = std::to_array({ - &mock_motor_left, - &mock_motor_right, - &mock_lcd, - }); + mock::DeepSleepEnabled mock_deep_sleep_enabled {}; + auto components = std::to_array({&mock_deep_sleep_enabled}); rc.registerDeepSleepEnabledComponents(components); + + EXPECT_CALL(mock_deep_sleep_enabled, enableDeepSleep); rc.suspendHardwareForDeepSleep(); }