public void SearchSucessResults() { try { CampeonatoService _service = new CampeonatoService(); Task <StandingsEntity> retorno = _service.SearchStandings("2021"); retorno.Wait(); if (retorno.IsCompletedSuccessfully) { Assert.AreNotEqual(retorno.Result, null); } } catch (Exception ex) { throw ex; } }
public void SearchNotExists() { try { CampeonatoService _service = new CampeonatoService(); Task <StandingsEntity> retorno = _service.SearchStandings("202"); retorno.Wait(); if (retorno.IsFaulted) { Assert.Equals(retorno.IsFaulted, true); } } catch (Exception ex) { throw ex; } }
public void SearchErrorService() { try { CampeonatoService _service = new CampeonatoService(); Task <StandingsEntity> retorno = _service.SearchStandings("flgjkdlsg/gfdgdf"); retorno.Wait(); if (retorno.IsFaulted) { Assert.Equals(retorno.IsFaulted, true); } } catch (Exception ex) { throw ex; } Assert.Pass(); }