Ejemplo n.º 1
0
        public void RunScriptByCommandLine()
        {
            string path = Path.GetFullPath(Path.Combine(TestContext.CurrentContext.TestDirectory, _BasePath, "CreateBoxBody.csx"));

            App = new ApplicationAdaptor();
            App.Init($"-runscript=\"{path}\"");
            MainWindow = new MainWindowAdaptor(App);
            Wait.UntilResponsive(MainWindow.Window);

            var pipe = new DebugPipeClient();

            Assert.AreEqual(1, pipe.GetValue <int>("$Context.Document.EntityCount"));
        }
Ejemplo n.º 2
0
        public void OpenSolidBrepByCommandLine()
        {
            string path = Path.GetFullPath(Path.Combine(TestContext.CurrentContext.TestDirectory, _BasePath, "ImprintRingFace.brep"));

            App = new ApplicationAdaptor();
            App.Init($"\"{path}\"");
            MainWindow = new MainWindowAdaptor(App);
            Wait.UntilResponsive(MainWindow.Window);

            var pipe = new DebugPipeClient();

            Assert.That(pipe.GetValue <int>("$Context.Document.EntityCount") > 0);
        }
Ejemplo n.º 3
0
        public void OpenModelByCommandLine()
        {
            string path = Path.GetFullPath(Path.Combine(TestContext.CurrentContext.TestDirectory, _BasePath, "Cylinder.model"));

            App = new ApplicationAdaptor();
            App.Init(true, path);
            MainWindow = new MainWindowAdaptor(App);
            Wait.UntilResponsive(MainWindow.Window);

            var pipe = new DebugPipeClient();

            Assert.That(pipe.GetValue <int>("$Context.Document.ChildCount") > 0);
        }
Ejemplo n.º 4
0
        public void OpenSolidStepByCommandLine()
        {
            string path = Path.GetFullPath(Path.Combine(TestContext.CurrentContext.TestDirectory, _BasePath, "ImportSolid.stp"));

            App = new ApplicationAdaptor();
            App.Init($"\"{path}\"");
            MainWindow = new MainWindowAdaptor(App);
            Wait.UntilResponsive(MainWindow.Window);

            var dlg = new WindowAdaptor(MainWindow, "ExchangerSettings");

            Assert.IsNotNull(dlg);
            dlg.ClickButton("Ok");
            Assert.IsFalse(WindowAdaptor.IsWindowOpen(MainWindow, "ExchangerSettings"));

            var pipe = new DebugPipeClient();

            Assert.That(pipe.GetValue <int>("$Context.Document.EntityCount") > 0);
        }