added missing tests in scenePriority
This commit is contained in:
parent
fa7fe5e8be
commit
ea0361c384
1 changed files with 38 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
||||||
package ch.usi.inf.sa4.sanmarinoes.smarthut.models;
|
package ch.usi.inf.sa4.sanmarinoes.smarthut.models;
|
||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
|
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
import org.junit.jupiter.api.DisplayName;
|
import org.junit.jupiter.api.DisplayName;
|
||||||
|
@ -39,4 +39,41 @@ public class ScenePriorityTests {
|
||||||
|
|
||||||
assertEquals(20, scenePriority.getPriority());
|
assertEquals(20, scenePriority.getPriority());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("get and set automation")
|
||||||
|
public void getAndSetAutomation() {
|
||||||
|
Automation a = new Automation();
|
||||||
|
scenePriority.setAutomation(a);
|
||||||
|
|
||||||
|
assertEquals(a, scenePriority.getAutomation());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("get and set scene")
|
||||||
|
public void getAndSetScene() {
|
||||||
|
Scene s = new Scene();
|
||||||
|
scenePriority.setScene(s);
|
||||||
|
|
||||||
|
assertEquals(s, scenePriority.getScene());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("get and set scene")
|
||||||
|
public void testRemove() {
|
||||||
|
Scene s = new Scene();
|
||||||
|
scenePriority.setScene(s);
|
||||||
|
scenePriority.setSceneId(20L);
|
||||||
|
|
||||||
|
Automation a = new Automation();
|
||||||
|
scenePriority.setAutomation(a);
|
||||||
|
scenePriority.setAutomationId(20L);
|
||||||
|
|
||||||
|
scenePriority.preRemove();
|
||||||
|
|
||||||
|
assertNull(scenePriority.getAutomation());
|
||||||
|
assertNull(scenePriority.getAutomationId());
|
||||||
|
assertNull(scenePriority.getScene());
|
||||||
|
assertNull(scenePriority.getSceneId());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue