From 7cdbb191261dfb677cc678865683a71e96049a21 Mon Sep 17 00:00:00 2001 From: omenem Date: Mon, 25 May 2020 14:37:20 +0200 Subject: [PATCH] scene priority --- .../sa4/sanmarinoes/smarthut/models/ScenePriority.java | 4 ++++ .../sanmarinoes/smarthut/models/ScenePriorityTests.java | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/models/ScenePriority.java b/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/models/ScenePriority.java index d6f7ef5..22b6f8f 100644 --- a/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/models/ScenePriority.java +++ b/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/models/ScenePriority.java @@ -38,6 +38,10 @@ public class ScenePriority { return id; } + public void setId(long id) { + this.id = id; + } + public Integer getPriority() { return priority; } diff --git a/src/test/java/ch/usi/inf/sa4/sanmarinoes/smarthut/models/ScenePriorityTests.java b/src/test/java/ch/usi/inf/sa4/sanmarinoes/smarthut/models/ScenePriorityTests.java index 574525c..04e2131 100644 --- a/src/test/java/ch/usi/inf/sa4/sanmarinoes/smarthut/models/ScenePriorityTests.java +++ b/src/test/java/ch/usi/inf/sa4/sanmarinoes/smarthut/models/ScenePriorityTests.java @@ -24,6 +24,14 @@ public class ScenePriorityTests { assertEquals(20, scenePriority.getAutomationId()); } + @Test + @DisplayName("get and set id") + public void getAndSetId() { + scenePriority.setId(20L); + + assertEquals(20, scenePriority.getId()); + } + @Test @DisplayName("get and set scene id") public void getAndSetSceneId() {