public void test01() { byte[] input = { (byte)((SECSItemFormatCodeFunctions.getNumberFromSECSItemFormatCode(SECSItemFormatCode.I1) << 2) | 0x01), 0x04, 255, 128, 0, 127 }; I1ArraySECSItem secsItem = new I1ArraySECSItem(input, 0, 0); Assert.IsTrue(secsItem.getValue()[0] == -1); Assert.IsTrue(secsItem.getValue()[1] == -128); Assert.IsTrue(secsItem.getValue()[2] == 0); Assert.IsTrue(secsItem.getValue()[3] == 127); }
public void test02() { sbyte[] input = { -1, -128, 0, 127 }; I1ArraySECSItem secsItem = new I1ArraySECSItem(input); Assert.IsTrue(secsItem.getValue().SequenceEqual(input)); }