public void Test33() { byte [] input = { (byte)((SECSItemFormatCodeFunctions.GetNumberFromSECSItemFormatCode(SECSItemFormatCode.L) << 2) | 0x03), 0x01, 0x00, 0x00 }; SECSItemTest secsItem = new SECSItemTest(input, 0); Assert.IsTrue(secsItem.GetLengthInBytes() == 65536); }
public void Test34() { byte [] input = { (byte)((SECSItemFormatCodeFunctions.GetNumberFromSECSItemFormatCode(SECSItemFormatCode.L) << 2) | 0x03), (byte)0xFF, (byte)0xFF, (byte)0xFF }; SECSItemTest secsItem = new SECSItemTest(input, 0); Assert.IsTrue(secsItem.GetLengthInBytes() == 16777215); }
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); }