public void FindEntity_ExceptionCaught_LogsAndRethrowsException()
        {
            // Arrange
            var service = new SharedService(_teamSeasonRepository);

            var teamName = "Team";
            var seasonID = 2017;

            A.CallTo(() => _teamSeasonRepository.FindEntity(A <string> .Ignored, A <int> .Ignored)).Throws <Exception>();

            // Act
            TeamSeason result = null;

            Assert.Throws <Exception>(() => result = service.FindTeamSeason(teamName, seasonID));

            // Assert
            Assert.IsNull(result);
        }
        public void FindEntity_HappyPath()
        {
            // Arrange
            var service = new SharedService(_teamSeasonRepository);

            var teamName = "Team";
            var seasonID = 2017;

            var teamSeason = new TeamSeason
            {
                TeamName = teamName,
                SeasonID = seasonID
            };

            A.CallTo(() => _teamSeasonRepository.FindEntity(A <string> .Ignored, A <int> .Ignored)).Returns(teamSeason);

            // Act
            var result = service.FindTeamSeason(teamName, seasonID);

            // Assert
            A.CallTo(() => _teamSeasonRepository.FindEntity(teamName, seasonID)).MustHaveHappenedOnceExactly();
            Assert.AreSame(teamSeason, result);
        }