示例#1
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");
        }
示例#2
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");
        }