Exemplo n.º 1
0
        public void SetColor_ToSingleLed_WithFade_UsesFadingMode()
        {
            var fakeUnderlyingDevice = new FakeHidDevice();

            using (var device = new Device(fakeUnderlyingDevice))
            {
                var color = new Color(0xC8, 0x14, 0x2A);
                device.SetColor(LedTarget.OfIndex(5), color, 64).Wait();
            }

            fakeUnderlyingDevice.AssertMessagesReceived("00:02:05:C8:14:2A:40:00:00");
        }
Exemplo n.º 2
0
        public void SetColorThroughPort_ToSingleLed_SimilarResult()
        {
            var fakeUnderlyingDevice = new FakeHidDevice();

            using (var device = new Device(fakeUnderlyingDevice))
            {
                var color = new Color(0xC8, 0x14, 0x2A);
                device.SetColor(LedTarget.OfIndex(4), color, 64).Wait();
                device[4].SetColor(color, 64).Wait();
            }

            fakeUnderlyingDevice.AssertBothMessagesAreEqual();
        }