public void TournamentAggregate_RecordPlayerScore_InvalidData_NotAllHoleScores_ErrorThrown()
        {
            TournamentAggregate aggregate = TournamentTestData.GetCreatedTournamentAggregateWithPlayerSignedUp();

            Should.Throw <InvalidDataException>(() =>
            {
                aggregate.RecordPlayerScore(TournamentTestData.PlayerId,
                                            TournamentTestData.PlayingHandicap,
                                            TournamentTestData.HoleScoresNotAllPresent);
            });
        }
        public void TournamentAggregate_RecordPlayerScore_InvalidData_NegativeHoleScores_ErrorThrown(Int32 holeNumber)
        {
            TournamentAggregate aggregate = TournamentTestData.GetCreatedTournamentAggregateWithPlayerSignedUp();

            Should.Throw <InvalidDataException>(() =>
            {
                aggregate.RecordPlayerScore(TournamentTestData.PlayerId,
                                            TournamentTestData.PlayingHandicap,
                                            TournamentTestData.HoleScoresNegativeScore(holeNumber));
            });
        }
        public void TournamentAggregate_SignUpForTournament_PlayerAlreadySignedUp_ErrorThrown()
        {
            TournamentAggregate tournament = TournamentTestData.GetCreatedTournamentAggregateWithPlayerSignedUp();

            Should.Throw <InvalidOperationException>(() => { tournament.SignUpForTournament(TournamentTestData.PlayerId); });
        }
        public void TournamentAggregate_RecordPlayerScore_PlayerScoreRecorded()
        {
            TournamentAggregate aggregate = TournamentTestData.GetCreatedTournamentAggregateWithPlayerSignedUp();

            Should.NotThrow(() => { aggregate.RecordPlayerScore(TournamentTestData.PlayerId, TournamentTestData.PlayingHandicap, TournamentTestData.HoleScores); });
        }