Esempio n. 1
0
        public void test03()
        {
            byte[]          input = { (byte)((SECSItemFormatCodeFunctions.getNumberFromSECSItemFormatCode(SECSItemFormatCode.I2) << 2) | 0x01),  10,
                                      255,                                                                                                               255,
                                      128,                                                                                                                 0,
                                      0,                                                                                                                   0,
                                      0,                                                                                                                   1,
                                      127, 255 };
            I2ArraySECSItem secsItem = new I2ArraySECSItem(input, 0);

            Assert.IsTrue(secsItem.getValue()[0] == -1);
            Assert.IsTrue(secsItem.getValue()[1] == -32768);
            Assert.IsTrue(secsItem.getValue()[2] == 0);
            Assert.IsTrue(secsItem.getValue()[3] == 1);
            Assert.IsTrue(secsItem.getValue()[4] == 32767);
        }
Esempio n. 2
0
        public void test04()
        {
            Int16[] input = new Int16[5];
            input[0] = -1;
            input[1] = -32768;
            input[2] = 0;
            input[3] = 1;
            input[4] = 32767;
            I2ArraySECSItem secsItem = new I2ArraySECSItem(input);

            Assert.IsTrue(secsItem.getValue().SequenceEqual(input));
        }