コード例 #1
0
 private void CSiApplication_Application_Start_with_Invalid_Model_Path()
 {
     using (CSiApplication app = new CSiApplication(CSiData.pathApp))
     {
         app.ApplicationStart(filePath: "FooBar.BadType");
     }
 }
コード例 #2
0
        public void CSiApplication_Application_Start_Default()
        {
            bool programWasOpened;

            using (CSiApplication app = new CSiApplication(CSiData.pathApp))
            {
                app.ApplicationStart();
                programWasOpened = true;
            }
            Assert.IsTrue(programWasOpened);
        }
コード例 #3
0
        public void CSiApplication_Application_Start_with_Valid_Model_Path()
        {
            bool programWasOpened;

            using (CSiApplication app = new CSiApplication(CSiData.pathApp))
            {
                app.ApplicationStart(filePath: Path.Combine(CSiData.pathResources, CSiData.pathModelDemo + CSiData.extension));
                programWasOpened = true;
            }
            Assert.IsTrue(programWasOpened);
        }
コード例 #4
0
        public void CSiApplication_Application_Start_with_Invisible_is_Invisible()
        {
            bool programIsVisible = true;

            using (CSiApplication app = new CSiApplication(CSiData.pathApp))
            {
                app.ApplicationStart(visible: false);
                programIsVisible = app.Visible();
            }
            Assert.IsFalse(programIsVisible);
        }
コード例 #5
0
        public void CSiApplication_Application_Start_with_Custom_Units()
        {
            bool programWasOpened;

            using (CSiApplication app = new CSiApplication(CSiData.pathApp))
            {
                app.ApplicationStart(eUnits.kgf_mm_C);
                programWasOpened = true;
            }
            Assert.IsTrue(programWasOpened);
        }
コード例 #6
0
        public void CSiApplication_Application_Start_Default_is_Visible()
        {
            bool programIsVisible;

            using (CSiApplication app = new CSiApplication(CSiData.pathApp))
            {
                app.ApplicationStart(visible: true);
                programIsVisible = app.Visible();
            }
            Assert.IsTrue(programIsVisible);
        }
コード例 #7
0
        public void CSiApplication_Show_Visible_Shows()
        {
            bool programIsVisible;

            using (CSiApplication app = new CSiApplication(CSiData.pathApp))
            {
                app.ApplicationStart(visible: true);
                programIsVisible = app.Visible();
                Assert.IsTrue(programIsVisible);

                app.Unhide();
                programIsVisible = app.Visible();
                Assert.IsTrue(programIsVisible);
            }
        }
コード例 #8
0
        public void CSiApplication_Hide_Hidden_Hides()
        {
            bool programIsVisible = true;

            using (CSiApplication app = new CSiApplication(CSiData.pathApp))
            {
                app.ApplicationStart(visible: false);
                programIsVisible = app.Visible();
                //Assert.IsFalse(programIsVisible); // TODO: This is suppressed as there is a problem with initializing hidden.

                app.Hide();
                programIsVisible = app.Visible();
                Assert.IsFalse(programIsVisible);

                app.Hide();
                programIsVisible = app.Visible();
                Assert.IsFalse(programIsVisible);
            }
        }
コード例 #9
0
ファイル: CSiModelTests.cs プロジェクト: uzbekdev1/MPT.Tools
 public void Setup()
 {
     _app = new CSiApplication(CSiData.pathApp);
     _app.ApplicationStart(filePath: CSiData.pathResources + @"\" + CSiData.pathModelSet + CSiData.extension);
 }