public void LoadCountries_DeserializesJson() { var sut = new GeonamesController(new GeonamesService(), LoadMockCountries); var countries = sut.LoadCountries(); countries.Should().HaveCount(1); countries.First().Capital.Should().Be("Kabul"); }
public override void AddReferenceDataToViewBag(dynamic viewBag) { viewBag.PossibleOtherClinicalInformation = DbSet().Where( s => !string.IsNullOrEmpty(s.OtherClinicalInformation)). Select(s => s.OtherClinicalInformation).AsDataList(); viewBag.PossibleOtherRiskFactors = DbSet().Where( s => !string.IsNullOrEmpty(s.OtherRiskFactor)). Select(s => s.OtherRiskFactor).AsDataList(); viewBag.Countries = geonamesController.LoadCountries(); }