This commit is contained in:
omenem 2020-05-26 18:42:56 +02:00
parent 5e9a83da8b
commit 1a1aa35a5b
2 changed files with 16 additions and 4 deletions

View file

@ -87,10 +87,6 @@ public class Sensor extends InputDevice implements RangeTriggerable {
this.typical = typical; this.typical = typical;
} }
public void setTypicalNull() {
this.typical = null;
}
public Sensor() { public Sensor() {
super("sensor"); super("sensor");
} }

View file

@ -26,6 +26,22 @@ public class SensorTests {
assertEquals(SensorType.LIGHT, sensor.getSensor()); 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 @Test
@DisplayName("get and set value") @DisplayName("get and set value")
public void getAndSetValue() { public void getAndSetValue() {