]> git.basschouten.com Git - openhab-addons.git/commitdiff
[ntp] Reenable itest (#8565)
authorWouter Born <github@maindrain.net>
Thu, 24 Sep 2020 06:42:12 +0000 (08:42 +0200)
committerGitHub <noreply@github.com>
Thu, 24 Sep 2020 06:42:12 +0000 (08:42 +0200)
With these changes and working channelLink events (openhab/openhab-core#1634) the ntp itest works again.

Signed-off-by: Wouter Born <github@maindrain.net>
itests/org.openhab.binding.ntp.tests/src/main/java/org/openhab/binding/ntp/test/NtpOSGiTest.java
itests/pom.xml

index 7d3ca1fbd8b27c9f9272078672c8b32dac607948..0a0dcb92de80827f351fa1169bdd0991ddaab5d6 100644 (file)
@@ -69,6 +69,7 @@ import org.openhab.core.thing.type.ChannelKind;
 import org.openhab.core.thing.type.ChannelTypeBuilder;
 import org.openhab.core.thing.type.ChannelTypeProvider;
 import org.openhab.core.thing.type.ChannelTypeUID;
+import org.openhab.core.types.RefreshType;
 import org.openhab.core.types.State;
 
 /**
@@ -489,7 +490,7 @@ public class NtpOSGiTest extends JavaOSGiTest {
         registerService(eventSubscriberMock);
 
         if (updateEventType.equals(UpdateEventType.HANDLE_COMMAND)) {
-            ntpHandler.handleCommand(new ChannelUID("ntp:test:chan:1"), new StringType("test"));
+            ntpHandler.handleCommand(new ChannelUID("ntp:test:chan:1"), RefreshType.REFRESH);
         } else if (updateEventType.equals(UpdateEventType.CHANNEL_LINKED)) {
             ntpHandler.channelLinked(new ChannelUID("ntp:test:chan:1"));
         }
index 5732fb391335ccc71b66f5fa746006dbd456b26e..96985c73ce00878c0b33264bb14ef0b8e423cdc1 100644 (file)
@@ -23,6 +23,7 @@
     <module>org.openhab.binding.max.tests</module>
     <module>org.openhab.binding.modbus.tests</module>
     <module>org.openhab.binding.nest.tests</module>
+    <module>org.openhab.binding.ntp.tests</module>
     <module>org.openhab.binding.systeminfo.tests</module>
     <module>org.openhab.binding.tradfri.tests</module>
     <module>org.openhab.binding.wemo.tests</module>