Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using AutoFixture;
- using Infrastructure;
- using Microsoft.VisualStudio.TestTools.UnitTesting;
- namespace InfrastructureTests
- {
- [TestClass]
- public class UrlOpenerTests
- {
- private Fixture fixture;
- private UrlOpener target;
- private string url;
- [TestInitialize]
- public void Initialize()
- {
- this.fixture = new Fixture();
- this.target = new UrlOpener();
- this.url = this.fixture.Create<string>();
- }
- [TestMethod]
- public void Dado_que_ao_abrir_uma_url_o_navegador_com_a_maior_prioridade_deve_ser_chamado()
- {
- // Act
- this.target.OpenUrl(this.url);
- //Não tenho como validar do jeito que está
- }
- [TestMethod]
- public void Dado_que_uma_url_vazia_for_enviada_deve_aparecer_uma_mensagem_de_erro()
- {
- // Act
- this.target.OpenUrl(string.Empty);
- }
- [TestMethod]
- public void Dado_que_nenhum_navegador_prioritário_estiver_instalado_verifique_se_é_maior_que_Windows_7_para_usar_o_Edge()
- {
- // Act
- this.target.OpenUrl(this.url);
- }
- [TestMethod]
- public void Dado_que_nenhum_navegador_prioritário_estiver_instalado_e_for_menor_que_o_Windows_7_abra_com_o_navegador_padrão()
- {
- // Act
- this.target.OpenUrl(this.url);
- }
- }
- }
Add Comment
Please, Sign In to add comment