diff --git a/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/models/Sensor.java b/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/models/Sensor.java index 7aee6c0..02c61d1 100644 --- a/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/models/Sensor.java +++ b/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/models/Sensor.java @@ -87,10 +87,6 @@ public class Sensor extends InputDevice implements RangeTriggerable { this.typical = typical; } - public void setTypicalNull() { - this.typical = null; - } - public Sensor() { super("sensor"); } diff --git a/src/test/java/ch/usi/inf/sa4/sanmarinoes/smarthut/models/SensorTests.java b/src/test/java/ch/usi/inf/sa4/sanmarinoes/smarthut/models/SensorTests.java index 0aa1089..b747a9a 100644 --- a/src/test/java/ch/usi/inf/sa4/sanmarinoes/smarthut/models/SensorTests.java +++ b/src/test/java/ch/usi/inf/sa4/sanmarinoes/smarthut/models/SensorTests.java @@ -26,6 +26,22 @@ public class SensorTests { assertEquals(SensorType.LIGHT, sensor.getSensor()); } + @Test + @DisplayName("get and set err") + public void getAndSetError() { + sensor.setError(BigDecimal.valueOf(10)); + + assertEquals(BigDecimal.valueOf(10), sensor.getError()); + } + + @Test + @DisplayName("get and set typical") + public void getAndSetTypical() { + sensor.setTypical(BigDecimal.valueOf(10)); + + assertEquals(BigDecimal.valueOf(10), sensor.getTypical()); + } + @Test @DisplayName("get and set value") public void getAndSetValue() {