sensor
This commit is contained in:
parent
5e9a83da8b
commit
1a1aa35a5b
2 changed files with 16 additions and 4 deletions
|
@ -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");
|
||||||
}
|
}
|
||||||
|
|
|
@ -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() {
|
||||||
|
|
Loading…
Reference in a new issue