public void GolfClubCommandHandler_HandleCommand_RequestClubMembershipCommand_CommandHandled() { Mock <IAggregateRepository <GolfClubAggregate> > repository = new Mock <IAggregateRepository <GolfClubAggregate> >(); Mock <ISecurityService> oAuth2SecurityService = new Mock <ISecurityService>(); Mock <IGolfClubMembershipApplicationService> golfClubMembershipApplicationService = new Mock <IGolfClubMembershipApplicationService>(); golfClubMembershipApplicationService.Setup(x => x.RequestClubMembership(It.IsAny <Guid>(), It.IsAny <Guid>(), CancellationToken.None)) .Returns(Task.CompletedTask); GolfClubCommandHandler handler = new GolfClubCommandHandler(repository.Object, oAuth2SecurityService.Object, golfClubMembershipApplicationService.Object); RequestClubMembershipCommand command = GolfClubTestData.GetRequestClubMembershipCommand(); Should.NotThrow(async() => { await handler.Handle(command, CancellationToken.None); }); }