diff --git a/cpp/test/abstract_controller_test.cpp b/cpp/test/abstract_controller_test.cpp index 9949d7b0..9394a986 100644 --- a/cpp/test/abstract_controller_test.cpp +++ b/cpp/test/abstract_controller_test.cpp @@ -11,6 +11,21 @@ using namespace scsi_defs; +TEST(AbstractControllerTest, ShutdownMode) +{ + MockAbstractController controller; + + EXPECT_EQ(AbstractController::shutdown_mode::NONE, controller.GetShutdownMode()); + controller.ScheduleShutdown(AbstractController::shutdown_mode::RESTART_PI); + EXPECT_EQ(AbstractController::shutdown_mode::RESTART_PI, controller.GetShutdownMode()); + controller.ScheduleShutdown(AbstractController::shutdown_mode::STOP_S2P); + EXPECT_EQ(AbstractController::shutdown_mode::STOP_S2P, controller.GetShutdownMode()); + controller.ScheduleShutdown(AbstractController::shutdown_mode::STOP_PI); + EXPECT_EQ(AbstractController::shutdown_mode::STOP_PI, controller.GetShutdownMode()); + controller.ScheduleShutdown(AbstractController::shutdown_mode::RESTART_PI); + EXPECT_EQ(AbstractController::shutdown_mode::RESTART_PI, controller.GetShutdownMode()); +} + TEST(AbstractControllerTest, AllocateCmd) { MockAbstractController controller;