From 9e98670ce96ab752a22d94409ba6ba05334240e5 Mon Sep 17 00:00:00 2001 From: "Claudio Maggioni (maggicl)" Date: Mon, 25 May 2020 12:13:32 +0200 Subject: [PATCH] Tests --- .../inf/sa4/sanmarinoes/smarthut/models/TriggerTests.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/test/java/ch/usi/inf/sa4/sanmarinoes/smarthut/models/TriggerTests.java b/src/test/java/ch/usi/inf/sa4/sanmarinoes/smarthut/models/TriggerTests.java index 643242a..adef575 100644 --- a/src/test/java/ch/usi/inf/sa4/sanmarinoes/smarthut/models/TriggerTests.java +++ b/src/test/java/ch/usi/inf/sa4/sanmarinoes/smarthut/models/TriggerTests.java @@ -1,6 +1,7 @@ package ch.usi.inf.sa4.sanmarinoes.smarthut.models; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; @@ -58,4 +59,11 @@ public class TriggerTests { booleanTrigger.setAutomationId(20L); assertEquals(20, booleanTrigger.getAutomationId()); } + + @Test + public void testRemove() { + booleanTrigger.setDeviceId(30L); + booleanTrigger.removeDeviceAndScene(); + assertNull(booleanTrigger.getDeviceId()); + } }