public void TournamentCommandHandler_HandleCommand_CompleteTournamentCommand_WithScores_CommandHandled() { Mock <IAggregateRepository <GolfClubAggregate> > golfClubRepository = new Mock <IAggregateRepository <GolfClubAggregate> >(); Mock <IAggregateRepository <TournamentAggregate> > tournamentRepository = new Mock <IAggregateRepository <TournamentAggregate> >(); tournamentRepository.Setup(t => t.GetLatestVersion(It.IsAny <Guid>(), It.IsAny <CancellationToken>())) .ReturnsAsync(TournamentTestData.GetCreatedTournamentWithScoresRecordedAggregate); Mock <ITournamentApplicationService> tournamentApplicationService = new Mock <ITournamentApplicationService>(); TournamentCommandHandler handler = new TournamentCommandHandler(golfClubRepository.Object, tournamentRepository.Object, tournamentApplicationService.Object); CompleteTournamentCommand command = TournamentTestData.GetCompleteTournamentCommand(); Should.NotThrow(async() => { await handler.Handle(command, CancellationToken.None); }); }