예제 #1
0
        public void Test03()
        {
            foreach (SECSItemFormatCode formatCode in Enum.GetValues(typeof(SECSItemFormatCode)))
            {
                SECSItemTest secsItem = new SECSItemTest(formatCode, 0);

                Assert.IsTrue(secsItem.GetSECSItemFormatCode() == formatCode);
                Assert.IsTrue(secsItem.GetFormatCode() == formatCode);
            }
        }
예제 #2
0
        public void Test23()
        {
            byte [] input = { 128, 255, 0, 1, 127 };

            // This is just a lazy way to get a known SECSItem in "wire format"
            BinarySECSItem secsItem = new BinarySECSItem(input, SECSItemNumLengthBytes.THREE);

            SECSItemTest secsItemA = new SECSItemTest(secsItem.ToRawSECSItem(), 0);

            Assert.IsTrue(secsItemA.GetInboundNumberOfLengthBytes() == SECSItemNumLengthBytes.THREE);
            Assert.IsTrue(secsItemA.GetSECSItemFormatCode() == SECSItemFormatCode.B);
            Assert.IsTrue(secsItemA.GetLengthInBytes() == 5);
        }