Beispiel #1
0
        public void TestConfMgmt_Modify()
        {
            ConfMgmt.Generate($@"{GlobalVar.SamplePath}/ConfigFiles");
            var conf = ConfMgmt.GetTree("SystemSetting");

            conf["DutsCount"] = "0";
            ConfMgmt.Save();

            conf = Builder.Xml.Generate($@"{GlobalVar.SamplePath}/ConfigFiles/Configs/SystemSetting.xml");
            JbAssert.Equal(conf["DutsCount"], "0");

            //restore
            ConfMgmt.Clear();
            ConfMgmt.Generate($@"{GlobalVar.SamplePath}/ConfigFiles");
            conf = ConfMgmt.GetTree("SystemSetting");

            conf["DutsCount"] = "40";
            ConfMgmt.Save();

            conf = Builder.Xml.Generate($@"{GlobalVar.SamplePath}/ConfigFiles/Configs/SystemSetting.xml");
            JbAssert.Equal(conf["DutsCount"], "40");
        }
        public void TestRealConfig_Modify()
        {
            ConfMgmt.Generate(GlobalVar.RealConfPath);
            var orig = ConfMgmt.Root;

            FileOp.RmDir(GlobalVar.ResultPath);
            FileOp.CopyDir(GlobalVar.RealConfPath, GlobalVar.ResultPath);

            ConfMgmt.Clear();
            ConfMgmt.Generate(GlobalVar.ResultPath);
            ConfMgmt.GetTree("BICalibration")["JMDM40_com"] = "";
            ConfMgmt.Save();

            ConfMgmt.Generate(GlobalVar.ResultPath);
            var copy = ConfMgmt.Root;
        }