コード例 #1
0
        public void EQP_Serialization_Tests()
        {
            RGOBase.ClearAll();
            EQP <double> eqp1 = new EQP <double>(5, "10100", "TestSubSys", "testParName", 10.5, 5, 15, Units.mA, "Test description");
            EQP <double> eqp2 = new EQP <double>(5, "10101", "TestSubSys", "testParName", 11.5, 5, 15, Units.mA, "Test description");

            Assert.IsFalse(eqp1.Value == eqp2.Value);

            EQPHistData ehd     = eqp1.GetEQPHistData();
            string      serdata = ehd.GetSerializationString();

            EQPHistData ehd2 = EQPHistData.GetInstance(serdata);

            eqp2.SetValueFromString(ehd2.NewValue);

            Assert.IsTrue(eqp1.Value == eqp2.Value);
        }