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