コード例 #1
0
        //Implemented The requirement of Race Summary from Unit testing with adding assertion one by one.
        public async void CheckStatusOfRaceWithIntialSetupShouldBeCompletedAndDetails()
        {
            await SetUpIntialTestData1();

            var summaries = await raceBusiness.GetRaceSummary();

            summaries.First().Status.Should().Be(RaceStatus.Completed.ToString());
            summaries.First().Stake.Should().Be(250);
            summaries.First().Hourses.Count.Should().Be(2);
            summaries.First().Hourses[0].BetCount.Should().Be(1);
            summaries.First().Hourses[0].PayOut.Should().Be(150);
        }
コード例 #2
0
        public async Task <IActionResult> GetRaceSummary()
        {
            var raceSummaries = await raceBusiness.GetRaceSummary();

            return(Ok(raceSummaries));
        }