Esempio n. 1
0
        public void GetMessageLightOFFTestShouldPass()
        {
            LightingMessage message = Lighting.GetMessage("*1*0*11##");

            Assert.AreEqual <WHAT>(message.What, WHAT.LightOFF);
            Assert.AreEqual <int>(message.Where.A, 1);
            Assert.AreEqual <int>(message.Where.PL, 1);
        }
Esempio n. 2
0
        public void GetMessageDimmerStrenghtTestShouldPass()
        {
            LightingMessage message = Lighting.GetMessage("*1*3*11##");

            Assert.AreEqual <WHAT>(message.What, WHAT.DimmerStrenght);
            Assert.AreEqual <int>(message.DimmerStrenght, 30);
            Assert.AreEqual <int>(message.Where.A, 1);
            Assert.AreEqual <int>(message.Where.PL, 1);
        }
Esempio n. 3
0
        public void GetMessageLightONAtSpeedTestShouldPass()
        {
            LightingMessage message = Lighting.GetMessage("*1*1#100*11##");

            Assert.AreEqual <WHAT>(message.What, WHAT.LightOnAtSpeed);
            Assert.AreEqual <int>(message.Speed, 100);
            Assert.AreEqual <int>(message.Where.A, 1);
            Assert.AreEqual <int>(message.Where.PL, 1);
        }
Esempio n. 4
0
        public void GetMessageLuminousIntensityChangeTestShouldPass()
        {
            LightingMessage message = Lighting.GetMessage("*#1*11*2*200*100##");

            Assert.AreEqual <WHAT>(message.What, WHAT.LightLuminousIntensityChange);
            Assert.AreEqual <int>(message.Level, 200);
            Assert.AreEqual <int>(message.Speed, 100);
            Assert.AreEqual <int>(message.Where.A, 1);
            Assert.AreEqual <int>(message.Where.PL, 1);
        }
Esempio n. 5
0
        public void GetMessageDimmerDownOfYAtXSpeedTestShouldPass()
        {
            LightingMessage message = Lighting.GetMessage("*1*31#100#200*11##");

            Assert.AreEqual <WHAT>(message.What, WHAT.DimmerDownAtSpeed);
            Assert.AreEqual <int>(message.Level, 100);
            Assert.AreEqual <int>(message.Speed, 200);
            Assert.AreEqual <int>(message.Where.A, 1);
            Assert.AreEqual <int>(message.Where.PL, 1);
        }
Esempio n. 6
0
        public void GetMessageTemporizationTestShouldPass()
        {
            LightingMessage message = Lighting.GetMessage("*#1*11*1*1*2*3##");

            Assert.AreEqual <WHAT>(message.What, WHAT.LightTemporization);
            Assert.AreEqual <int>(message.Temporization.Hours, 1);
            Assert.AreEqual <int>(message.Temporization.Minutes, 2);
            Assert.AreEqual <int>(message.Temporization.Seconds, 3);
            Assert.AreEqual <int>(message.Where.A, 1);
            Assert.AreEqual <int>(message.Where.PL, 1);
        }