示例#1
0
        public void TestConstructorAndConversionBase5()
        {
            BaseConvertStructure test = new BaseConvertStructure(5, 75);
            byte[] result = test.GetBaseRepresentation();

            byte[] expected = new byte[3];
            expected[0] = 3;
            expected[1] = 0;
            expected[2] = 0;

            CollectionAssert.AreEqual(result, expected);
        }
示例#2
0
        public void TestNotOperationBase5()
        {
            BaseConvertStructure test = new BaseConvertStructure(5, 13);
            BaseConvertStructure notTest = !test;
            byte[] result = notTest.GetBaseRepresentation();

            byte[] expected = new byte[2];
            expected[0] = 2;
            expected[1] = 1;

            CollectionAssert.AreEqual(result, expected);
        }
示例#3
0
        public void TestConstructorAndConversionBase16()
        {
            BaseConvertStructure test = new BaseConvertStructure(16, 31);
            byte[] result = test.GetBaseRepresentation();

            byte[] expected = new byte[2];
            expected[0] = 1;
            expected[1] = 70;

            CollectionAssert.AreEqual(result, expected);
        }