Esempio n. 1
0
 public void AsyncTaskException()
 {
     /* Crash the application inside an asynchronous task and then restart */
     app.Tap(TestStrings.GoToCrashesPageButton);
     app.Tap(TestStrings.CrashInsideAsyncTaskButton);
     TestSuccessfulCrash();
     LastSessionErrorReportHelper.app = app;
     Assert.IsTrue(LastSessionErrorReportHelper.VerifyExceptionType(typeof(IOException).Name));
     Assert.IsTrue(LastSessionErrorReportHelper.VerifyExceptionMessage(TestStrings.IOExceptionMessage));
 }
Esempio n. 2
0
 public void DivideByZero()
 {
     /* Crash the application with a divide by zero exception and then restart */
     app.Tap(TestStrings.GoToCrashesPageButton);
     app.Tap(TestStrings.DivideByZeroCrashButton);
     TestSuccessfulCrash();
     LastSessionErrorReportHelper.app = app;
     Assert.IsTrue(LastSessionErrorReportHelper.VerifyExceptionType(typeof(DivideByZeroException).Name));
     Assert.IsTrue(LastSessionErrorReportHelper.VerifyExceptionMessage(TestStrings.DivideByZeroExceptionMessage));
 }
Esempio n. 3
0
 public void AggregateException()
 {
     /* Crash the application with an aggregate exception and then restart */
     app.Tap(TestStrings.GoToCrashesPageButton);
     app.Tap(TestStrings.CrashWithAggregateExceptionButton);
     TestSuccessfulCrash();
     LastSessionErrorReportHelper.app = app;
     Assert.IsTrue(LastSessionErrorReportHelper.VerifyExceptionType(typeof(AggregateException).Name));
     Assert.IsTrue(LastSessionErrorReportHelper.VerifyExceptionMessage(TestStrings.AggregateExceptionMessage));
 }
Esempio n. 4
0
        public void AsyncTaskException()
        {
            app.Screenshot("AsyncTaskException - Ready for tests");
            /* Crash the application inside an asynchronous task and then restart */
            app.WaitForElement(TestStrings.GoToCrashesPageButton);
            app.Tap(TestStrings.GoToCrashesPageButton);
            app.WaitForElement(TestStrings.CrashInsideAsyncTaskButton);
            app.Tap(TestStrings.CrashInsideAsyncTaskButton);

            Thread.Sleep(AfterCrashSleepTime);

            TestSuccessfulCrash();
            LastSessionErrorReportHelper.app = app;
            Assert.IsTrue(LastSessionErrorReportHelper.VerifyExceptionType(typeof(IOException).Name));
            Assert.IsTrue(LastSessionErrorReportHelper.VerifyExceptionMessage(TestStrings.IOExceptionMessage));
        }
Esempio n. 5
0
        public void DivideByZero()
        {
            app.Screenshot("DivideByZero - Ready for tests");
            /* Crash the application with a divide by zero exception and then restart */
            app.WaitForElement(TestStrings.GoToCrashesPageButton);
            app.Tap(TestStrings.GoToCrashesPageButton);
            app.WaitForElement(TestStrings.DivideByZeroCrashButton);
            app.Tap(TestStrings.DivideByZeroCrashButton);

            Thread.Sleep(AfterCrashSleepTime);

            TestSuccessfulCrash();
            LastSessionErrorReportHelper.app = app;
            Assert.IsTrue(LastSessionErrorReportHelper.VerifyExceptionType(typeof(DivideByZeroException).Name));
            Assert.IsTrue(LastSessionErrorReportHelper.VerifyExceptionMessage(TestStrings.DivideByZeroExceptionMessage));
        }
Esempio n. 6
0
        public void AggregateException()
        {
            app.Screenshot("AggregateException - Ready for tests");
            /* Crash the application with an aggregate exception and then restart */
            app.WaitForElement(TestStrings.GoToCrashesPageButton);
            app.Tap(TestStrings.GoToCrashesPageButton);
            app.WaitForElement(TestStrings.CrashWithAggregateExceptionButton);
            app.Tap(TestStrings.CrashWithAggregateExceptionButton);

            Thread.Sleep(AfterCrashSleepTime);

            TestSuccessfulCrash();
            LastSessionErrorReportHelper.app = app;
            Assert.IsTrue(LastSessionErrorReportHelper.VerifyExceptionType(typeof(AggregateException).Name));
            Assert.IsTrue(LastSessionErrorReportHelper.VerifyExceptionMessage(TestStrings.AggregateExceptionMessage));
        }