public void GetDataShouldReturnValidHueData() { const int hueOffset = 1; var color = Color.Cyan; var data = CreatePayloadData(color, Percentage.MaxValue, Temperature.None, 0); HueConverter.ConvertUInt16ToHue(data.ToUInt16(hueOffset)).Should().Be(color.Hue); }
private static Hue ParseHue(byte[] data) { var value = data.ToUInt16(startIndex: 0); return(HueConverter.ConvertUInt16ToHue(value)); }