public async Task GetTeamSeasonScheduleTotals_WhenExceptionIsNotCaught_ShouldReturnTeamSeasonOpponentTotalsModel()
        {
            // Arrange
            var teamSeasonScheduleRepository = A.Fake <ITeamSeasonScheduleRepository>();
            TeamSeasonScheduleTotals?teamSeasonScheduleTotals = new TeamSeasonScheduleTotals();

            A.CallTo(() => teamSeasonScheduleRepository.GetTeamSeasonScheduleTotalsAsync(
                         A <string> .Ignored, A <int> .Ignored)).Returns(teamSeasonScheduleTotals);

            var mapper = A.Fake <IMapper>();
            var teamSeasonScheduleTotalsModel = new TeamSeasonScheduleTotalsModel();

            A.CallTo(() => mapper.Map <TeamSeasonScheduleTotalsModel>(A <TeamSeasonScheduleTotals> .Ignored))
            .Returns(teamSeasonScheduleTotalsModel);

            var testController = new TeamSeasonScheduleController(teamSeasonScheduleRepository, mapper);

            string teamName   = "Team";
            int    seasonYear = 1920;

            // Act
            var result = await testController.GetTeamSeasonScheduleTotals(teamName, seasonYear);

            // Assert
            A.CallTo(() => teamSeasonScheduleRepository.GetTeamSeasonScheduleTotalsAsync(teamName, seasonYear))
            .MustHaveHappenedOnceExactly();
            A.CallTo(() => mapper.Map <TeamSeasonScheduleTotalsModel>(teamSeasonScheduleTotals))
            .MustHaveHappenedOnceExactly();
            result.Value.ShouldBeOfType <TeamSeasonScheduleTotalsModel>();
        }
        public async Task GetTeamSeasonScheduleTotals_WhenExceptionIsCaught_ShouldReturnInternalServerError()
        {
            // Arrange
            var teamSeasonScheduleRepository = A.Fake <ITeamSeasonScheduleRepository>();

            A.CallTo(() => teamSeasonScheduleRepository.GetTeamSeasonScheduleTotalsAsync(
                         A <string> .Ignored, A <int> .Ignored)).Throws <Exception>();

            var mapper = A.Fake <IMapper>();

            var testController = new TeamSeasonScheduleController(teamSeasonScheduleRepository, mapper);

            string teamName   = "Team";
            int    seasonYear = 1920;

            // Act
            var result = await testController.GetTeamSeasonScheduleTotals(teamName, seasonYear);

            // Assert
            result.Result.ShouldBeOfType <ObjectResult>();
            ((ObjectResult)result.Result).StatusCode.ShouldBe(StatusCodes.Status500InternalServerError);
            ((ObjectResult)result.Result).Value.ShouldBe("Database failure");
        }