Thermostat

This commit is contained in:
omenem 2020-05-26 18:09:26 +02:00
parent 9a86220a79
commit 1aab50c9f8

View file

@ -63,6 +63,13 @@ public class ThermostatControllerTests {
assertThat(toCheck.isUseExternalSensors()).isEqualTo(request.isUseExternalSensors()); assertThat(toCheck.isUseExternalSensors()).isEqualTo(request.isUseExternalSensors());
assertThat(toCheck.getName()).isEqualTo(request.getName()); assertThat(toCheck.getName()).isEqualTo(request.getName());
assertThat(toCheck.getRoomId()).isEqualTo(request.getRoomId()); assertThat(toCheck.getRoomId()).isEqualTo(request.getRoomId());
if (request.getErr() != null) {
assertThat(toCheck.getErr()).isEqualTo(request.getErr());
}
if (request.getTypical() != null) {
assertThat(toCheck.getTypical()).isEqualTo(request.getTypical());
}
} }
@Test @Test
@ -83,6 +90,8 @@ public class ThermostatControllerTests {
toSend.setTargetTemperature(new BigDecimal(40)); toSend.setTargetTemperature(new BigDecimal(40));
toSend.setName("Thermostat Test"); toSend.setName("Thermostat Test");
toSend.setUseExternalSensors(true); toSend.setUseExternalSensors(true);
toSend.setErr(BigDecimal.valueOf(10));
toSend.setTypical(BigDecimal.valueOf(15));
final Thermostat thermostat = thermostatController.create(toSend, mockPrincipal); final Thermostat thermostat = thermostatController.create(toSend, mockPrincipal);