[hdpowerview] Fix autoupdate quirk. (#12141)
Fixes #12140 Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
This commit is contained in:
@@ -29,6 +29,7 @@ import org.openhab.binding.hdpowerview.internal.builders.SceneChannelBuilder;
|
||||
import org.openhab.core.thing.Channel;
|
||||
import org.openhab.core.thing.ChannelGroupUID;
|
||||
import org.openhab.core.thing.ThingUID;
|
||||
import org.openhab.core.thing.type.AutoUpdatePolicy;
|
||||
import org.osgi.framework.Bundle;
|
||||
|
||||
/**
|
||||
@@ -80,6 +81,15 @@ public class SceneChannelBuilderTest {
|
||||
assertEquals(Integer.toString(scenes.get(0).id), channels.get(0).getUID().getIdWithoutGroup());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void autoUpdatePolicyIsCorrect() {
|
||||
List<Scene> scenes = createScenes();
|
||||
List<Channel> channels = builder.withScenes(scenes).build();
|
||||
|
||||
assertEquals(1, channels.size());
|
||||
assertEquals(AutoUpdatePolicy.VETO, channels.get(0).getAutoUpdatePolicy());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void suppliedListIsUsed() {
|
||||
List<Scene> scenes = createScenes();
|
||||
|
||||
@@ -29,6 +29,7 @@ import org.openhab.binding.hdpowerview.internal.builders.SceneGroupChannelBuilde
|
||||
import org.openhab.core.thing.Channel;
|
||||
import org.openhab.core.thing.ChannelGroupUID;
|
||||
import org.openhab.core.thing.ThingUID;
|
||||
import org.openhab.core.thing.type.AutoUpdatePolicy;
|
||||
import org.osgi.framework.Bundle;
|
||||
|
||||
/**
|
||||
@@ -80,6 +81,15 @@ public class SceneGroupChannelBuilderTest {
|
||||
assertEquals(Integer.toString(sceneCollections.get(0).id), channels.get(0).getUID().getIdWithoutGroup());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void autoUpdatePolicyIsCorrect() {
|
||||
List<SceneCollection> sceneCollections = createSceneCollections();
|
||||
List<Channel> channels = builder.withSceneCollections(sceneCollections).build();
|
||||
|
||||
assertEquals(1, channels.size());
|
||||
assertEquals(AutoUpdatePolicy.VETO, channels.get(0).getAutoUpdatePolicy());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void suppliedListIsUsed() {
|
||||
List<SceneCollection> sceneCollections = createSceneCollections();
|
||||
|
||||
Reference in New Issue
Block a user