Guest User

Untitled

a guest
Sep 20th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. exitButton.Click += (o, e) =>
  2. {
  3. int pid = Android.OS.Process.MyPid();
  4. Android.OS.Process.KillProcess(pid);
  5. };
  6.  
  7. [Test]
  8. public void ExitButtonClosesTheScreen()
  9. {
  10. try
  11. {
  12. app.Tap(c => c.Button("exitButton"));
  13. Assert.Fail("App remains open.");
  14. }
  15. catch (System.Exception e)
  16. {
  17. Assert.AreEqual("The underlying connection was closed: The connection was closed unexpectedly.", e.InnerException.InnerException.InnerException.Message);
  18. }
  19. }
Add Comment
Please, Sign In to add comment