public async Task ListStatusAsync() { try { var data = await _ICovidLogic.GetCovid19CasesAsync(); foreach (var item in data) { foreach (var entityProp in data.GetType().GetProperties()) { var entityValue = entityProp.GetValue(item); if (!string.IsNullOrEmpty(entityValue as string)) { var result = $"{entityProp.Name}: {entityValue}"; Console.WriteLine(result); } } } } catch (Exception ex) { Console.WriteLine(ex.Message); } }
public async Task GetLatestsCovid19NumbersTestAsync() { var covid19Cases = await _ICovidLogic.GetCovid19CasesAsync(); Assert.AreNotEqual("No Content", covid19Cases); //Assert.(covid19Cases) //.As(new covid19Cases()) //.Given(covid19Cases) //.When(covid19Cases) //.Then(covid19Cases); }
public async Task TestGetListOfDataAsync() { var data = await _ICovidLogic.GetCovid19CasesAsync(); Assert.NotNull(data); }
public async Task <List <Covid19> > ListOfCovid19DataAsync() { return(await _iCoronaComponent.GetCovid19CasesAsync()); }