public void GetNewsData() { var users = _storeService.FindAll <User>(); var user = users.ToList()[0]; var telefone = user.DddPhoneNumber; var ddd = telefone.Substring(0, 2); NewsWr newsWr = new NewsWr(); var result = newsWr.GetJsonData(ddd, "Quarentined"); if (result != null) { NewsItems = new ObservableCollection <News>(result.news); HeaderTitle = result.header_title; HeaderBody = result.header_body; if (result.number_of_days != null && result.number_of_days != "0" && result.number_of_days != "") { NumberOfDays = result.number_of_days; IVDaysBox = true; } else { IVDaysBox = false; } } }
public void TesteGetJson() { NewsWr news = new NewsWr(); var result = news.GetJsonData("41", "Unknow"); Assert.NotNull(result); }
public void TestVerifyData() { NewsWr news = new NewsWr(); var result = news.GetJsonData("41", "Recovered"); Assert.NotNull(result); //Assert.IsType<int>(result[0].Id); //Assert.IsType<string>(result[0].Title); //Assert.IsType<string>(result[0].Content); //Assert.Contains("http", result[0].Uri); //Assert.IsType<string>(result[0].PhoneNumber); }
public void GetNewsData() { var users = _storeService.FindAll <User>(); var user = users.ToList()[0]; var telefone = user.DddPhoneNumber; var ddd = telefone.Substring(0, 2); NewsWr newsWr = new NewsWr(); var result = newsWr.GetJsonData(ddd, "Unknow"); if (result != null) { NewsItems = new ObservableCollection <News>(result.news); HeaderTitle = result.header_title; HeaderBody = result.header_body; } }