From 04374ef4afa728f39854c222dea83de8165bb3f5 Mon Sep 17 00:00:00 2001 From: Jacob Laursen Date: Sun, 19 Mar 2023 07:45:16 +0100 Subject: [PATCH] Fix color tests after HSBType changes (#14631) Signed-off-by: Jacob Laursen --- .../binding/mqtt/generic/ChannelStateTests.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bundles/org.openhab.binding.mqtt.generic/src/test/java/org/openhab/binding/mqtt/generic/ChannelStateTests.java b/bundles/org.openhab.binding.mqtt.generic/src/test/java/org/openhab/binding/mqtt/generic/ChannelStateTests.java index ed29f5980..90176963d 100644 --- a/bundles/org.openhab.binding.mqtt.generic/src/test/java/org/openhab/binding/mqtt/generic/ChannelStateTests.java +++ b/bundles/org.openhab.binding.mqtt.generic/src/test/java/org/openhab/binding/mqtt/generic/ChannelStateTests.java @@ -297,23 +297,23 @@ public class ChannelStateTests { c.processMessage("state", "ON".getBytes()); // Normal on state assertThat(value.getChannelState().toString(), is("0,0,10")); - assertThat(value.getMQTTpublishValue((Command) value.getChannelState(), null), is("0.312716,0.329002,10.00")); + assertThat(value.getMQTTpublishValue((Command) value.getChannelState(), null), is("0.322700,0.329000,10.00")); c.processMessage("state", "FOFF".getBytes()); // Custom off state assertThat(value.getChannelState().toString(), is("0,0,0")); - assertThat(value.getMQTTpublishValue((Command) value.getChannelState(), null), is("0.312716,0.329002,0.00")); + assertThat(value.getMQTTpublishValue((Command) value.getChannelState(), null), is("0.000000,0.000000,0.00")); c.processMessage("state", "10".getBytes()); // Brightness only assertThat(value.getChannelState().toString(), is("0,0,10")); - assertThat(value.getMQTTpublishValue((Command) value.getChannelState(), null), is("0.312716,0.329002,10.00")); + assertThat(value.getMQTTpublishValue((Command) value.getChannelState(), null), is("0.322700,0.329000,10.00")); HSBType t = HSBType.fromXY(0.3f, 0.6f); c.processMessage("state", "0.3,0.6,100".getBytes()); assertThat(value.getChannelState(), is(t)); // HSB - assertThat(value.getMQTTpublishValue((Command) value.getChannelState(), null), is("0.300000,0.600000,100.00")); + assertThat(value.getMQTTpublishValue((Command) value.getChannelState(), null), is("0.304200,0.594600,100.00")); assertThat(value.getMQTTpublishValue((Command) value.getChannelState(), "%3$.1f,%2$.4f,%1$.4f"), - is("100.0,0.6000,0.3000")); + is("100.0,0.5946,0.3042")); } @Test