Example #1
0
        public void SetUp()
        {
            App = new ApplicationAdaptor();
            App.Init("-nowelcome");

            // Create main window
            MainWindow = new MainWindowAdaptor(App);
        }
Example #2
0
        public void SetUp()
        {
            App = new ApplicationAdaptor();
            App.Init("");

            MainWindow    = new MainWindowAdaptor(App);
            WelcomeDialog = new WindowAdaptor(MainWindow, "WelcomeDialog");
        }
Example #3
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);
        }
Example #4
0
        public void RunScriptWithErrorsByCommandLine()
        {
            string path = Path.GetFullPath(Path.Combine(TestContext.CurrentContext.TestDirectory, _BasePath, "CompilerError.csx"));

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

            var dlg = new TaskDialogAdaptor(MainWindow);

            Assert.IsNotNull(dlg);
        }
Example #5
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"));
        }
Example #6
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);
        }
Example #7
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);
        }
Example #8
0
 public void Stop()
 {
     App?.Cleanup();
     App        = null;
     MainWindow = null;
 }