Guest User

Untitled

a guest
Aug 18th, 2018
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. using AutoFixture;
  2. using Infrastructure;
  3. using Microsoft.VisualStudio.TestTools.UnitTesting;
  4.  
  5. namespace InfrastructureTests
  6. {
  7. [TestClass]
  8. public class UrlOpenerTests
  9. {
  10. private Fixture fixture;
  11. private UrlOpener target;
  12. private string url;
  13. [TestInitialize]
  14. public void Initialize()
  15. {
  16. this.fixture = new Fixture();
  17. this.target = new UrlOpener();
  18. this.url = this.fixture.Create<string>();
  19. }
  20.  
  21. [TestMethod]
  22. public void Dado_que_ao_abrir_uma_url_o_navegador_com_a_maior_prioridade_deve_ser_chamado()
  23. {
  24. // Act
  25. this.target.OpenUrl(this.url);
  26.  
  27. //Não tenho como validar do jeito que está
  28. }
  29.  
  30. [TestMethod]
  31. public void Dado_que_uma_url_vazia_for_enviada_deve_aparecer_uma_mensagem_de_erro()
  32. {
  33. // Act
  34. this.target.OpenUrl(string.Empty);
  35. }
  36.  
  37. [TestMethod]
  38. public void Dado_que_nenhum_navegador_prioritário_estiver_instalado_verifique_se_é_maior_que_Windows_7_para_usar_o_Edge()
  39. {
  40. // Act
  41. this.target.OpenUrl(this.url);
  42. }
  43.  
  44. [TestMethod]
  45. public void Dado_que_nenhum_navegador_prioritário_estiver_instalado_e_for_menor_que_o_Windows_7_abra_com_o_navegador_padrão()
  46. {
  47. // Act
  48. this.target.OpenUrl(this.url);
  49. }
  50. }
  51. }
Add Comment
Please, Sign In to add comment