Esempio n. 1
0
        public void WriteDataOffTest()
        {
            byte[] dataExpected = { 60, 193, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };

            CommandUK_Accessor target = new CommandUK_Accessor();

            using (MemoryStream stream = new MemoryStream())
            {
                target.WriteData(stream, 1001, Command.Off);
                CollectionAssert.AreEqual(dataExpected, stream.ToArray());
            }
        }
Esempio n. 2
0
        public void BuildTest()
        {
            byte[] dataExpected =
            {
                1,  0,  32,  3, 202,  0,  0,  0,
                2,  0,  32, 96,  96, 32, 24, 18,
                3, 60, 193, 21,   0,  0,  0,  0,
                4,  0,   0,  0,   0,  0,  0,  0,
                5,  0,   0,  0,   0,  0,  0, 0
            };

            CommandUK_Accessor target = new CommandUK_Accessor();

            byte[] data = target.Build(1001, Command.On);
            CollectionAssert.AreEqual(dataExpected, data);
        }