Exemplo n.º 1
0
        public void SetLightDirectiveCreationWithNoGadgetsSerializesProperly()
        {
            var setLight = SetLightDirective.Create(
                SetLightParameter.Create(
                    SetLightAnimation.CreateSingle(
                        AnimationSegment.Create("0000FF", 10000)
                        )));

            Assert.True(Utility.CompareJson(setLight, "SetLightDirectiveBroadcast.json"));
        }
Exemplo n.º 2
0
        public void SetLightDirectiveViaCreationSerializesProperly()
        {
            var setLight = SetLightDirective.Create(
                new[] { "gadgetId1", "gadgetId2" },
                SetLightParameter.Create(
                    TriggerEvent.None, 0,
                    SetLightAnimation.Create(1, new[] { "1" },
                                             new AnimationSegment
            {
                Blend = false,
                DurationMilliseconds = 10000,
                Color = "0000FF"
            }
                                             )));

            Assert.True(Utility.CompareJson(setLight, "SetLightDirective.json"));
        }