summaryrefslogtreecommitdiffstats
path: root/test/physical.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/physical.cpp')
-rw-r--r--test/physical.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/test/physical.cpp b/test/physical.cpp
index 1b546ed..897a43f 100644
--- a/test/physical.cpp
+++ b/test/physical.cpp
@@ -70,7 +70,7 @@ using ::testing::NiceMock;
using ::testing::Return;
using ::testing::Throw;
-TEST(Physical, ctor)
+TEST(Physical, ctor_none_trigger)
{
sdbusplus::bus::bus bus = sdbusplus::bus::new_default();
/* NiceMock ignores calls to methods with no expectations defined */
@@ -79,6 +79,16 @@ TEST(Physical, ctor)
phosphor::led::Physical phy(bus, LED_OBJ, led);
}
+TEST(Physical, ctor_timer_trigger)
+{
+ sdbusplus::bus::bus bus = sdbusplus::bus::new_default();
+ NiceMock<MockLed> led;
+ EXPECT_CALL(led, getTrigger()).WillOnce(Return("timer"));
+ EXPECT_CALL(led, getDelayOn()).WillOnce(Return(500));
+ EXPECT_CALL(led, getDelayOff()).WillOnce(Return(500));
+ phosphor::led::Physical phy(bus, LED_OBJ, led);
+}
+
TEST(Physical, off)
{
sdbusplus::bus::bus bus = sdbusplus::bus::new_default();
OpenPOWER on IntegriCloud