public void Test01() { byte [] input = { (byte)((SECSItemFormatCodeFunctions.GetNumberFromSECSItemFormatCode(SECSItemFormatCode.U1) << 2) | 0x01), 0x04, 255, 128, 0, 127 }; U1ArraySECSItem secsItem = new U1ArraySECSItem(input, 0, 0); Assert.IsTrue(secsItem.GetValue() [0] == 255); Assert.IsTrue(secsItem.GetValue() [1] == 128); Assert.IsTrue(secsItem.GetValue() [2] == 0); Assert.IsTrue(secsItem.GetValue() [3] == 127); }
public void Test02() { byte [] input = { 255, 128, 0, 127 }; U1ArraySECSItem secsItem = new U1ArraySECSItem(input); Assert.AreEqual(secsItem.GetValue(), input); }
public void Test08() { byte [] input = { (byte)((SECSItemFormatCodeFunctions.GetNumberFromSECSItemFormatCode(SECSItemFormatCode.U1) << 2) | 0x01), 0x00 }; U1ArraySECSItem secsItem = new U1ArraySECSItem(input, 0, 0); Assert.IsTrue(secsItem.GetValue().Length == 0); }