Ejemplo n.º 1
0
        public void TestDisplayHuePicker()
        {
            const ushort itemID    = 0xFF01;
            var          huePicker = new HuePicker(itemID);

            var data = new DisplayHuePicker(huePicker).Compile();

            Span <byte> expectedData = stackalloc byte[9];
            var         pos          = 0;

            expectedData.Write(ref pos, (byte)0x95);
            expectedData.Write(ref pos, huePicker.Serial);
#if NO_LOCAL_INIT
            expectedData.Write(ref pos, (ushort)0);
#else
            pos += 2;
#endif
            expectedData.Write(ref pos, itemID);

            AssertThat.Equal(data, expectedData);
        }