public AccountOrchestratorTests() { UserId = Guid.NewGuid(); Account = GetAccount(UserId); Repository = GetRepositoryMock(Account); Orchestrator = new AccountOrchestrator(Repository.Object); }
public async Task UpgradePlan_WhenAccountDoesntExist_ThrowsException() { Repository = new Mock <IAccountRepository>(); Orchestrator = new AccountOrchestrator(Repository.Object); await Assert.ThrowsAsync <AccountNotFoundException>( async() => await Orchestrator.UpgradePlan(Account.Id, null)); }
public async Task GetAccountUsers_WhenAccountDoesntExist_ThrowsException() { Repository = new Mock <IAccountRepository>(); Orchestrator = new AccountOrchestrator(Repository.Object); await Assert.ThrowsAsync <AccountNotFoundException>( async() => await Orchestrator.GetAccountUsers(Account.Id)); }
public async Task RegisterUserToAccount_WhenAccountDoesntExist_ThrowsException() { Repository = new Mock <IAccountRepository>(); Orchestrator = new AccountOrchestrator(Repository.Object); await Assert.ThrowsAsync <AccountNotFoundException>( async() => await Orchestrator.RegisterUserToAccount(Account.Id, Guid.NewGuid())); }
public async Task RegisterUserToAccount_WhenUserLimitReached_ThrowsException() { var account = GetStartupAccountWithNumberOfUsers(new StartupPlan().MaxNumberOfUsersAllowed); Repository = GetRepositoryMock(account); Orchestrator = new AccountOrchestrator(Repository.Object); await Assert.ThrowsAsync <UserLimitExceededException>( async() => await Orchestrator.RegisterUserToAccount(account.Id, UserId)); }
public EmailOrchestrator(IAccountOrchestrator accountOrchestrator, IMediator mediator, IProviderCommitmentsLogger logger) { _accountOrchestrator = accountOrchestrator; _mediator = mediator; _logger = logger; }
public AccountController(IAccountOrchestrator orchestrator) { Orchestrator = orchestrator; }
/// <summary> /// Initializes a new instance of the AccountsController class. /// </summary> /// <param name="accountOrchestrator">The <see cref="IAccountOrchestrator"/> required for performing operations.</param> public AccountsController(IAccountOrchestrator accountOrchestrator) { _accountOrchestrator = accountOrchestrator; }