public void Ensure_WolferHampton_Race_Model_Is_Operating() { RetrieveWolferHamptonRaceDataService retrieveWolferHamptonRaceDataService = new RetrieveWolferHamptonRaceDataService(); var data = retrieveWolferHamptonRaceDataService.Get(); Assert.NotNull(data); }
public Task <IEnumerable <SimpleHorse> > Get() { RetrieveWolferHamptonRaceDataService wolferHamptonRaceDataService = new RetrieveWolferHamptonRaceDataService(); var dataInOriginalFormat = wolferHamptonRaceDataService.Get(); var allMarkets = dataInOriginalFormat.SelectMany(e => e.RawData.Markets); var allSelections = allMarkets.SelectMany(e => e.Selections); //assumption here is that Price is the right value not prize money return(Task.FromResult(allSelections.Select(e => new SimpleHorse() { Race = RaceType.WolferHamptonRace, Name = e.Tags.Name, Price = Convert.ToDouble(e.Price) }))); }