public async void CanReadJson() { var provider = new WolferhamptonFeed(); var response = await provider.GetParticipants(); Assert.True(response.IsValid); Assert.Equal(2, response.Data.Count); }
public static IList <IFeed> GetAllFeeds(IServiceProvider serviceProvider) { //TODO dynamically control the feeds using confid var caulFeed = new CaulfieldFeed(EmbeddedFeeds.GetFeed("Caulfield_Race1.xml")); var wolfFeed = new WolferhamptonFeed(EmbeddedFeeds.GetFeed("Wolferhampton_Race1.json")); return(new List <IFeed> { caulFeed, wolfFeed }); }
public void RetursTheRaceModelFromTheFeedTest() { var feed = EmbeddedFeeds.GetFeed("Wolferhampton_Race1.json"); var wolfFeed = new WolferhamptonFeed(feed); var actual = wolfFeed.GetRaceTrackWithAllRaces(); Assert.Equal("13:45 @ Wolverhampton", actual.Races[0].Name); Assert.Equal((decimal)4.4, actual.Races[0].Horses[1].Price); }