예제 #1
0
        public void Unpack_ValidateMethod(string command)
        {
            var bytes = Encoding.ASCII.GetBytes(command);

            var expected = Encoding.ASCII.GetString(bytes);

            var actual = IDashboardPackage.Unpack(bytes);

            Assert.Equal(expected.Length, actual.Length);

            Assert.Equal(expected, actual);
        }
예제 #2
0
        public void Pack_ValidateMethod(string command)
        {
            var expected = Encoding.ASCII.GetBytes(command);

            var actual = IDashboardPackage.Pack(command);

            Assert.Equal(expected.Length, actual.Length);

            for (int i = 0; i < expected.Length; i++)
            {
                Assert.Equal(expected[i], actual[i]);
            }
        }