Exemple #1
0
        public void AllOne()
        {
            var _station = Station.Create().TypeStation("Station").NameStation("НТЭЦ4");
            var app      = new ReadWord("TestExcel.xlsx");

            app.ReadParameterValues(_station, 2);
            var station = app.ReadFormula(_station, 1);
            var write   = new WriteXml(station, "Testxml.xml");

            write.WriteXmlbySerealise();
            Assert.IsTrue(File.Exists("Testxml.xml"));
        }
Exemple #2
0
        public void ReadFormula()
        {
            var _station    = Station.Create();
            var app         = new ReadWord("TestExcel.xlsx");
            var assertnodes = app.ReadFormula(_station, 5);

            StringAssert.Contains(assertnodes.Tables[0].Name, "Расчет ТЭП, котлы, «вахта»");
            StringAssert.Contains(assertnodes.Tables[0].Type, "Folder");

            StringAssert.Contains(assertnodes.Tables[0].Tamples[0].Name, "к-5");
            StringAssert.Contains(assertnodes.Tables[0].Tamples[0].Type, "TEPTemplate");
            StringAssert.Contains(assertnodes.Tables[0].Tamples[0].Property[0].Value, "[UTC+04]=1d");

            StringAssert.Contains(assertnodes.Tables[0].Tamples[0].Signals[0].Name, "Признак работы");
            StringAssert.Contains(assertnodes.Tables[0].Tamples[0].Signals[0].Property[0].Value, "k^{в}_{к}");
            StringAssert.Contains(assertnodes.Tables[0].Tamples[0].Signals[0].Property[0].Name, "formula_cod");
            StringAssert.Contains(assertnodes.Tables[0].Tamples[0].Signals[0].Property[1].Name, "formula_text");
            //StringAssert.Contains(assertnodes.Tables[0].Tamples[0].Signals[0].Property[1].Value, "$k^{тоII}_{80}$*(first($э^{тоII}_{80}$)-first($э^{тоII}_{80}$,1))/1e3");

            StringAssert.Contains(assertnodes.ParameterValueses[0].Code, "k^{в}_{к}");
        }