diff --git a/src/test/java/ch/usi/inf/sa4/sanmarinoes/smarthut/DimmableStateTests.java b/src/test/java/ch/usi/inf/sa4/sanmarinoes/smarthut/DimmableStateTests.java index 87bd181..7dbfe35 100644 --- a/src/test/java/ch/usi/inf/sa4/sanmarinoes/smarthut/DimmableStateTests.java +++ b/src/test/java/ch/usi/inf/sa4/sanmarinoes/smarthut/DimmableStateTests.java @@ -11,11 +11,11 @@ import org.junit.jupiter.api.Test; @DisplayName("Dimmable State Tests") public class DimmableStateTests { - private DimmableState dimmableState; + private DimmableState dimmableState; @BeforeEach public void createDimmableState() { - dimmableState = new DimmableState<>(); + dimmableState = new DimmableState(); } @Test diff --git a/src/test/java/ch/usi/inf/sa4/sanmarinoes/smarthut/RangeConditionTests.java b/src/test/java/ch/usi/inf/sa4/sanmarinoes/smarthut/RangeConditionTests.java index 354d6da..1d7772e 100644 --- a/src/test/java/ch/usi/inf/sa4/sanmarinoes/smarthut/RangeConditionTests.java +++ b/src/test/java/ch/usi/inf/sa4/sanmarinoes/smarthut/RangeConditionTests.java @@ -3,8 +3,8 @@ package ch.usi.inf.sa4.sanmarinoes.smarthut; import static org.junit.jupiter.api.Assertions.*; import ch.usi.inf.sa4.sanmarinoes.smarthut.models.DimmableLight; +import ch.usi.inf.sa4.sanmarinoes.smarthut.models.Operator; import ch.usi.inf.sa4.sanmarinoes.smarthut.models.RangeCondition; -import ch.usi.inf.sa4.sanmarinoes.smarthut.models.RangeCondition.Operator; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; @@ -22,9 +22,9 @@ public class RangeConditionTests { @Test @DisplayName("set and get operator") public void setAndGetOperator() { - rangeCondition.setOperator(RangeCondition.Operator.EQUAL); + rangeCondition.setOperator(Operator.EQUAL); - assertEquals(RangeCondition.Operator.EQUAL, rangeCondition.getOperator()); + assertEquals(Operator.EQUAL, rangeCondition.getOperator()); } @Test @@ -43,10 +43,10 @@ public class RangeConditionTests { rangeCondition.setDevice(d); rangeCondition.setRange(45D); - rangeCondition.setOperator(RangeCondition.Operator.EQUAL); + rangeCondition.setOperator(Operator.EQUAL); assertFalse(rangeCondition.triggered()); - rangeCondition.setOperator(RangeCondition.Operator.LESS); + rangeCondition.setOperator(Operator.LESS); assertTrue(rangeCondition.triggered()); rangeCondition.setOperator(Operator.GREATER); diff --git a/src/test/java/ch/usi/inf/sa4/sanmarinoes/smarthut/RangeTriggerTests.java b/src/test/java/ch/usi/inf/sa4/sanmarinoes/smarthut/RangeTriggerTests.java index 6dda510..4c46d70 100644 --- a/src/test/java/ch/usi/inf/sa4/sanmarinoes/smarthut/RangeTriggerTests.java +++ b/src/test/java/ch/usi/inf/sa4/sanmarinoes/smarthut/RangeTriggerTests.java @@ -5,6 +5,7 @@ import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; import ch.usi.inf.sa4.sanmarinoes.smarthut.models.DimmableLight; +import ch.usi.inf.sa4.sanmarinoes.smarthut.models.Operator; import ch.usi.inf.sa4.sanmarinoes.smarthut.models.RangeTrigger; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; @@ -23,9 +24,9 @@ public class RangeTriggerTests { @Test @DisplayName("set and get operator") public void setAndGetOperator() { - rangeTrigger.setOperator(RangeTrigger.Operator.EQUAL); + rangeTrigger.setOperator(Operator.EQUAL); - assertEquals(RangeTrigger.Operator.EQUAL, rangeTrigger.getOperator()); + assertEquals(Operator.EQUAL, rangeTrigger.getOperator()); } @Test @@ -44,19 +45,19 @@ public class RangeTriggerTests { rangeTrigger.setDevice(d); rangeTrigger.setRange(45D); - rangeTrigger.setOperator(RangeTrigger.Operator.EQUAL); + rangeTrigger.setOperator(Operator.EQUAL); assertFalse(rangeTrigger.triggered()); - rangeTrigger.setOperator(RangeTrigger.Operator.LESS); + rangeTrigger.setOperator(Operator.LESS); assertTrue(rangeTrigger.triggered()); - rangeTrigger.setOperator(RangeTrigger.Operator.GREATER); + rangeTrigger.setOperator(Operator.GREATER); assertFalse(rangeTrigger.triggered()); - rangeTrigger.setOperator(RangeTrigger.Operator.LESS_EQUAL); + rangeTrigger.setOperator(Operator.LESS_EQUAL); assertTrue(rangeTrigger.triggered()); - rangeTrigger.setOperator(RangeTrigger.Operator.GREATER_EQUAL); + rangeTrigger.setOperator(Operator.GREATER_EQUAL); assertFalse(rangeTrigger.triggered()); } } diff --git a/src/test/java/ch/usi/inf/sa4/sanmarinoes/smarthut/SwitchableStateTests.java b/src/test/java/ch/usi/inf/sa4/sanmarinoes/smarthut/SwitchableStateTests.java index c89e04f..737053d 100644 --- a/src/test/java/ch/usi/inf/sa4/sanmarinoes/smarthut/SwitchableStateTests.java +++ b/src/test/java/ch/usi/inf/sa4/sanmarinoes/smarthut/SwitchableStateTests.java @@ -2,7 +2,6 @@ package ch.usi.inf.sa4.sanmarinoes.smarthut; import static org.junit.jupiter.api.Assertions.*; -import ch.usi.inf.sa4.sanmarinoes.smarthut.models.DimmableLight; import ch.usi.inf.sa4.sanmarinoes.smarthut.models.SwitchableState; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; @@ -11,11 +10,11 @@ import org.junit.jupiter.api.Test; @DisplayName("Switchable State Tests") public class SwitchableStateTests { - private SwitchableState switchableState; + private SwitchableState switchableState; @BeforeEach public void createSwitchableState() { - switchableState = new SwitchableState<>(); + switchableState = new SwitchableState(); } @Test