Ejemplo n.º 1
0
        public void TestBerLengthSetLogic()
        {
            AcspBerLength test = new AcspBerLength(12);

            Byte[] testBytes = new Byte[4];

            // test.Length = 12;

            test.LengthArray.CopyTo(testBytes, 0);

            Assert.AreEqual(0x83, testBytes[0]);
            Assert.AreEqual(0x0C, testBytes[3]);
        }
Ejemplo n.º 2
0
        public void TestAcspBerLengthGetLogic()
        {
            Byte[] testBytes = new Byte[4];

            testBytes[0] = 0x83;
            testBytes[1] = 0x00;
            testBytes[2] = 0x00;
            testBytes[3] = 0x0C;

            AcspBerLength test = new AcspBerLength(testBytes);

            // test.LengthArray = testBytes;

            int result = test.Length;

            Assert.AreEqual(12, result);
        }
Ejemplo n.º 3
0
        public void TestMethod1()
        {
            Byte[] testBytes = new Byte[4];

            testBytes[0] = 0x83;
            testBytes[1] = 0x00;
            testBytes[2] = 0x00;
            testBytes[3] = 0x0C;

            AcspBerLength berLength = new AcspBerLength(testBytes);

            // berLength.LengthArray = testBytes;

            testBytes[3] = 0x55;

            testBytes = berLength.LengthArray;

            Assert.AreEqual(testBytes[3], 0x0C);
        }