Exemplo 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));
 }
Exemplo 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));
 }
Exemplo 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));
 }
Exemplo 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));
        }
Exemplo 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));
        }
Exemplo 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));
        }