Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. using NUnit.Framework;
  2. using Xamarin.UITest;
  3. using Xamarin.UITest.Android;
  4.  
  5. namespace AAP.UITests
  6. {
  7. [TestFixture(Platform.Android)]
  8.  
  9. public class TestBase
  10. {
  11. protected AppManager appm;
  12. protected IApp app => AppManager.App;
  13. protected AndroidApp androidApp;
  14. protected bool OnAndroid => AppManager.Platform == Platform.Android;
  15. protected bool OniOS => AppManager.Platform == Platform.iOS;
  16.  
  17. public TestBase(Platform platform)
  18. {
  19. AppManager.Platform = platform;
  20. }
  21.  
  22. public TestBase()
  23. { }
  24.  
  25. [OneTimeSetUp]
  26.  
  27. public void BeforeEachTest()
  28. {
  29. AppManager.StartApp();
  30. appm = AppManager.Appm;
  31.  
  32. }
  33. }
  34. }
  35.  
  36. I am using:
  37. SpecFlow, SpecFlow.Nunit, SpecFlow.Tools.MsBuild.Generation - 3.0.199
  38. NUnit, NUnit3TestAdapter - 3.12.0
  39. Xamarin.UITest 2.2.7
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement