sysfs: Integrate class into Physical and tests

Change-Id: I7d5ad19df5ef1258a4e669ea3243b7411f371d9c
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
diff --git a/test/physical.cpp b/test/physical.cpp
index 9ab4a30..4316b16 100644
--- a/test/physical.cpp
+++ b/test/physical.cpp
@@ -8,30 +8,35 @@
 constexpr auto LED_SYSFS = "/sys/class/leds/test";
 
 using Action = sdbusplus::xyz::openbmc_project::Led::server::Physical::Action;
+namespace fs = std::experimental::filesystem;
 
 TEST(Physical, ctor)
 {
     sdbusplus::bus::bus bus = sdbusplus::bus::new_default();
-    phosphor::led::Physical led(bus, LED_OBJ, LED_SYSFS);
+    phosphor::led::SysfsLed led{fs::path(LED_SYSFS)};
+    phosphor::led::Physical phy(bus, LED_OBJ, led);
 }
 
 TEST(Physical, off)
 {
     sdbusplus::bus::bus bus = sdbusplus::bus::new_default();
-    phosphor::led::Physical led(bus, LED_OBJ, LED_SYSFS);
-    led.state(Action::Off);
+    phosphor::led::SysfsLed led{fs::path(LED_SYSFS)};
+    phosphor::led::Physical phy(bus, LED_OBJ, led);
+    phy.state(Action::Off);
 }
 
 TEST(Physical, on)
 {
     sdbusplus::bus::bus bus = sdbusplus::bus::new_default();
-    phosphor::led::Physical led(bus, LED_OBJ, LED_SYSFS);
-    led.state(Action::On);
+    phosphor::led::SysfsLed led{fs::path(LED_SYSFS)};
+    phosphor::led::Physical phy(bus, LED_OBJ, led);
+    phy.state(Action::On);
 }
 
 TEST(Physical, blink)
 {
     sdbusplus::bus::bus bus = sdbusplus::bus::new_default();
-    phosphor::led::Physical led(bus, LED_OBJ, LED_SYSFS);
-    led.state(Action::Blink);
+    phosphor::led::SysfsLed led{fs::path(LED_SYSFS)};
+    phosphor::led::Physical phy(bus, LED_OBJ, led);
+    phy.state(Action::Blink);
 }