Пример #1
0
        public void TestCheckAppExists()
        {
            var demoApp = new ApplicationUnderTest("", "");

            demoApp.ShowDesktop();
            try
            {
                demoApp.RunOnce();
                Assert.Fail("Test Application not there but test passing");
            }
            catch
            {
                Assert.IsTrue(true);
            }
        }
Пример #2
0
        public void TestLaunchWinFormDemoApp()
        {
            var demoApp = new ApplicationUnderTest("", "TestControlTests.exe");

            demoApp.ShowDesktop();
            demoApp.RunOnce();
            if (demoApp.WaitForCaptionIfExists("***Demo Form-aaaaa", 2))
            {
                Assert.Fail("this should not pass");
            }

            if (demoApp.WaitForCaptionIfExists("Demo Form", 2))
            {
                Assert.IsTrue(true);
            }
            else
            {
                Assert.Fail("unable to get demoapp window caption");
            }

            demoApp.Terminate();
        }