public AccountController(INotifiable notifiable, IOpenAccountUseCase accountUseCase, IGetAccountUseCase getAccountUseCase) : base(notifiable) { _notifiable = notifiable; _accountUseCase = accountUseCase; _getAccountUseCase = getAccountUseCase; }
public async Task <IActionResult> GetAsync( [FromServices] IGetAccountUseCase useCase, [FromRoute][Required] Guid accountId) { useCase.SetOutputPort(this); await useCase.ExecuteAsync(accountId); return(_viewModel); }
public async Task <IActionResult> Get( [FromServices] IGetAccountUseCase useCase, [FromRoute][Required] Guid accountId) { useCase.SetOutputPort(this); await useCase.Execute(accountId) .ConfigureAwait(false); return(this._viewModel !); }
public async Task <IActionResult> Get( [FromServices] IGetAccountUseCase useCase, [FromRoute][Required] GetAccountDetailsRequestV2 request) { useCase.SetOutputPort(this); await useCase.Execute(new GetAccountInput(request.AccountId)) .ConfigureAwait(false); return(this._viewModel !); }
public AccountsController(IGetAccountUseCase getAccountUseCase) { _getAccountsUseCase = getAccountUseCase; _presenter = new Presenter(); }
/// <summary> /// Initializes a new instance of the <see cref="GetAccountValidationUseCase" /> class. /// </summary> public GetAccountValidationUseCase(IGetAccountUseCase useCase) => this._useCase = useCase;
public GetAccountValidationUseCase(IGetAccountUseCase useCase) { _useCase = useCase; }
public WhenGettingAnAccount() { _mockAccountRepository = new Mock <IAccountReadOnlyRepository>(); _sut = new GetAccountUseCase(_mockAccountRepository.Object); }
/// <summary> /// Initializes a new instance of the <see cref="GetAccountValidationUseCase" /> class. /// </summary> public GetAccountValidationUseCase(IGetAccountUseCase useCase, Notification notification) { this._useCase = useCase; this._notification = notification; this._outputPort = new GetAccountPresenter(); }