From 1aab50c9f8c9b507e57e59305d4ab00ae838b576 Mon Sep 17 00:00:00 2001 From: omenem Date: Tue, 26 May 2020 18:09:26 +0200 Subject: [PATCH] Thermostat --- .../smarthut/controller/ThermostatControllerTests.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/test/java/ch/usi/inf/sa4/sanmarinoes/smarthut/controller/ThermostatControllerTests.java b/src/test/java/ch/usi/inf/sa4/sanmarinoes/smarthut/controller/ThermostatControllerTests.java index 2f23934..41dfd0d 100644 --- a/src/test/java/ch/usi/inf/sa4/sanmarinoes/smarthut/controller/ThermostatControllerTests.java +++ b/src/test/java/ch/usi/inf/sa4/sanmarinoes/smarthut/controller/ThermostatControllerTests.java @@ -63,6 +63,13 @@ public class ThermostatControllerTests { assertThat(toCheck.isUseExternalSensors()).isEqualTo(request.isUseExternalSensors()); assertThat(toCheck.getName()).isEqualTo(request.getName()); 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 @@ -83,6 +90,8 @@ public class ThermostatControllerTests { toSend.setTargetTemperature(new BigDecimal(40)); toSend.setName("Thermostat Test"); toSend.setUseExternalSensors(true); + toSend.setErr(BigDecimal.valueOf(10)); + toSend.setTypical(BigDecimal.valueOf(15)); final Thermostat thermostat = thermostatController.create(toSend, mockPrincipal);