示例#1
0
        private void Generate(TablGenerator gen, string dirName)
        {
            TestLib.CopyDir("Generator", dirName);
            var dir = TestLib.TestRunDir + @"Generator\" + dirName + @"\";

            gen.GenerateParams(dir);
            TestLib.CompareGeneratedParams(dir + "Compiled.accdb", dir + "CorrectCompiled.accdb");
        }
示例#2
0
 private void ButInit_Click(object sender, EventArgs e)
 {
     TestLib.CopyDir("Calibrator", "CalibratorProject");
     _launcher = new ItLauncher();
     //_launcher.InitializeTest();
     _launcher.Initialize("Test");
     _project = _launcher.LoadCalibratorProject(TestLib.TestRunDir + @"Calibrator\CalibratorProject\");
     _project.OpenThreads(PeriodLength.Text.ToDouble(), LateLength.Text.ToDouble());
 }
示例#3
0
        private SourceConnect MakeCloneConnect(string prefix)
        {
            TestLib.CopyDir(@"Providers\Fictive", "TestClone", "Clone" + prefix);
            var factory = new ProvidersFactory();
            var logger  = new Logger(new AppIndicator());

            logger.History = new TestHistory(logger);
            var connect = factory.CreateConnect(logger, ProviderType.Source, "TestSource", "Clones");

            connect.JoinProvider(factory.CreateProvider(logger, "CloneSource", "CloneDir=" + TestLib.TestRunDir + @"Providers\Fictive\Clone" + prefix));
            return((SourceConnect)connect);
        }
示例#4
0
        public void GenCalcParams()
        {
            TestLib.CopyDir("Generator", "Module");
            string dir    = TestLib.TestRunDir + @"Generator\Module\";
            var    logger = new Logger(new TestIndicator());

            logger.History = new TestHistory(logger);
            var gen = new TablGenerator(logger);

            gen.GenerateParams(dir);
            TestLib.CompareGeneratedParams(dir + "Compiled.accdb", dir + "CorrectCompiled.accdb");
        }
示例#5
0
        private TablikProject LoadProject(string projectCode, string projectSuffix, params string[] modules)
        {
            TestLib.CopyDir("Tablik", projectCode, projectCode + projectSuffix);
            var app    = new App("Constructor", new TestIndicator(), true);
            var proj   = new AppProject(app, TestLib.TestRunDir + @"Tablik\" + projectCode + projectSuffix);
            var tablik = proj.Tablik;

            tablik.LoadAllSignals();
            foreach (var module in modules)
            {
                tablik.AddModule(module);
            }
            return(tablik);
        }
示例#6
0
        public void Clone()
        {
            TestLib.CopyDir(@"Providers\Mir", "Clone");

            var app = new App("Test", new TestIndicator(), false);

            app.InitTest();
            var con = new ClonerConnect(app);

            con.JoinProvider(app.ProvidersFactory.CreateProvider(app, "MirSource", TestLib.TestSqlInf("EnergyRes")));
            var cloneDir = TestLib.TestRunDir + @"Providers\Mir\Clone\";

            SysTabl.PutValueS(cloneDir + "Clone.accdb", "SourceInf", TestLib.TestSqlInf("EnergyRes"));
            using (con.StartPeriod(D(48), D(96), "Single"))
                con.MakeClone(cloneDir);
            TestLib.CompareClones(cloneDir + "Clone.accdb", cloneDir + "CorrectClone.accdb");
        }
示例#7
0
        public void Clone()
        {
            TestLib.CopyDir(@"Providers\Logika", "Clone");
            TestLib.CopyFile(@"Providers\Logika", "prolog.mdb", "CloneProlog.mdb");
            var app = new App("Test", new TestIndicator(), false);

            app.InitTest();
            var con = new ClonerConnect(app);

            con.JoinProvider(app.ProvidersFactory.CreateProvider(app, "LogikaSource", "DbFile=" + TestLib.TestRunDir + @"Providers\Logika\CloneProlog.mdb"));
            var cloneDir = TestLib.TestRunDir + @"Providers\Logika\Clone\";

            SysTabl.PutValueS(cloneDir + "Clone.accdb", "SourceInf", "DbFile=" + TestLib.TestRunDir + @"Providers\Logika\CloneProlog.mdb");
            using (con.StartPeriod(D(0), D(24), "Single"))
                con.MakeClone(cloneDir);
            TestLib.CompareClones(cloneDir + "Clone.accdb", cloneDir + "CorrectClone.accdb");
        }