diff --git a/src/main/java/de/ctdo/bunti/dao/BuntiDevicesDAOImpl.java b/src/main/java/de/ctdo/bunti/dao/BuntiDevicesDAOImpl.java index a142599..e9c009b 100644 --- a/src/main/java/de/ctdo/bunti/dao/BuntiDevicesDAOImpl.java +++ b/src/main/java/de/ctdo/bunti/dao/BuntiDevicesDAOImpl.java @@ -53,7 +53,7 @@ public final class BuntiDevicesDAOImpl implements BuntiDevicesDAO { @Override public BuntiDevice getDeviceById(int deviceId) { for (BuntiDevice dev : devices) { - if(dev.getDeviceId() == deviceId) { + if(dev.getId() == deviceId) { return dev; } } diff --git a/src/main/java/de/ctdo/bunti/model/BuntiDevice.java b/src/main/java/de/ctdo/bunti/model/BuntiDevice.java index d0bbba3..2922fbf 100644 --- a/src/main/java/de/ctdo/bunti/model/BuntiDevice.java +++ b/src/main/java/de/ctdo/bunti/model/BuntiDevice.java @@ -35,7 +35,7 @@ public abstract class BuntiDevice { * Gets the device Id * @return the device Id */ - public final int getDeviceId() { + public final int getId() { return deviceId; } diff --git a/src/main/java/de/ctdo/bunti/model/Par56Spot.java b/src/main/java/de/ctdo/bunti/model/Par56Spot.java index c59c0e2..5af682d 100644 --- a/src/main/java/de/ctdo/bunti/model/Par56Spot.java +++ b/src/main/java/de/ctdo/bunti/model/Par56Spot.java @@ -67,7 +67,7 @@ public class Par56Spot extends BuntiDMXDevice { public final String toString() { StringBuilder sb = new StringBuilder(); sb.append("Par56Spot "); - sb.append(getDeviceId()); + sb.append(getId()); sb.append(", "); sb.append(getDeviceName()); sb.append(" ["); diff --git a/src/main/java/de/ctdo/bunti/model/Strobe1500.java b/src/main/java/de/ctdo/bunti/model/Strobe1500.java index f0bd9f7..35b4e93 100644 --- a/src/main/java/de/ctdo/bunti/model/Strobe1500.java +++ b/src/main/java/de/ctdo/bunti/model/Strobe1500.java @@ -59,7 +59,7 @@ public class Strobe1500 extends BuntiDMXDevice { public final String toString() { StringBuilder sb = new StringBuilder(); sb.append("Strobe1500 "); - sb.append(getDeviceId()); + sb.append(getId()); sb.append(", "); sb.append(getDeviceName()); sb.append(" ["); diff --git a/src/test/java/de/ctdo/bunti/model/BuntiDMXDeviceTest.java b/src/test/java/de/ctdo/bunti/model/BuntiDMXDeviceTest.java index c3583f9..c1388e8 100644 --- a/src/test/java/de/ctdo/bunti/model/BuntiDMXDeviceTest.java +++ b/src/test/java/de/ctdo/bunti/model/BuntiDMXDeviceTest.java @@ -139,7 +139,7 @@ public class BuntiDMXDeviceTest { @Test public void testGetDeviceId() throws Exception { - assertEquals(DEVICEID, dut.getDeviceId()); + assertEquals(DEVICEID, dut.getId()); } @Test