fix
This commit is contained in:
parent
5946d0974e
commit
0ce6e84380
4 changed files with 17 additions and 17 deletions
|
@ -11,11 +11,11 @@ import org.junit.jupiter.api.Test;
|
|||
@DisplayName("Dimmable State Tests")
|
||||
public class DimmableStateTests {
|
||||
|
||||
private DimmableState<DimmableLight> dimmableState;
|
||||
private DimmableState dimmableState;
|
||||
|
||||
@BeforeEach
|
||||
public void createDimmableState() {
|
||||
dimmableState = new DimmableState<>();
|
||||
dimmableState = new DimmableState();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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<DimmableLight> switchableState;
|
||||
private SwitchableState switchableState;
|
||||
|
||||
@BeforeEach
|
||||
public void createSwitchableState() {
|
||||
switchableState = new SwitchableState<>();
|
||||
switchableState = new SwitchableState();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in a new issue