From 861e5625ed88a7eb68c671a91d7d68b9fa71aad2 Mon Sep 17 00:00:00 2001 From: Andrew Jeffery Date: Fri, 25 May 2018 14:51:45 +0930 Subject: test: physical: Capture Action::Blink parameters Implement value sensing to verify behaviour of the blink action. This constrains future blink changes to interacting with sysfs in the same manner. Change-Id: I7ed0a5d52e8dc99192e7938760ce99f618b9cb16 Signed-off-by: Andrew Jeffery --- test/physical.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/physical.cpp b/test/physical.cpp index f62caa2..1ffe9f3 100644 --- a/test/physical.cpp +++ b/test/physical.cpp @@ -112,7 +112,10 @@ TEST(Physical, blink) { sdbusplus::bus::bus bus = sdbusplus::bus::new_default(); NiceMock led; - ON_CALL(led, getTrigger()).WillByDefault(Return("none")); + EXPECT_CALL(led, getTrigger()).WillOnce(Return("none")); + EXPECT_CALL(led, setTrigger("timer")); + EXPECT_CALL(led, setDelayOn(500)); + EXPECT_CALL(led, setDelayOff(500)); phosphor::led::Physical phy(bus, LED_OBJ, led); phy.state(Action::Blink); } -- cgit v1.2.1