コード例 #1
0
        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);
        }
コード例 #2
0
        public void Test02()
        {
            byte []         input    = { 255, 128, 0, 127 };
            U1ArraySECSItem secsItem = new U1ArraySECSItem(input);

            Assert.AreEqual(secsItem.GetValue(), input);
        }
コード例 #3
0
        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);
        }