[hue] fix JUnit tests for revised ColorUtil (#16559)

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
This commit is contained in:
Andrew Fiddian-Green 2024-04-28 20:05:23 +01:00 committed by GitHub
parent 5765a9485d
commit 8329668931
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -265,13 +265,13 @@ public class HueLightHandlerTest {
@Test
public void assertXYCommandForColorChannelWhite() {
String expectedReply = "{\"xy\" : [ 0.3227 , 0.32900003 ], \"bri\" : 254, \"transitiontime\" : 4}";
String expectedReply = "{\"xy\" : [ 0.3227267 , 0.3290229 ], \"bri\" : 254, \"transitiontime\" : 4}";
assertSendCommandForColor(HSBType.WHITE, new HueLightState().colormode(ColorMode.XY), expectedReply);
}
@Test
public void assertXYCommandForColorChannelColorful() {
String expectedReply = "{\"xy\" : [ 0.14649999 , 0.115600005 ], \"bri\" : 127, \"transitiontime\" : 4}";
String expectedReply = "{\"xy\" : [ 0.14657576 , 0.115629844 ], \"bri\" : 127, \"transitiontime\" : 4}";
assertSendCommandForColor(new HSBType("220,90,50"), new HueLightState().colormode(ColorMode.XY), expectedReply);
}