public void Arrange() { _accountApiClient = new Mock <IAccountApiClient>(); _mediator = new Mock <IMediator>(); _currentTime = new Mock <ICurrentDateTime>(); _hashingService = new Mock <IHashingService>(); _response = new GetEmployerAccountResponse { Account = new Account { Name = "Test Account" } }; _hashingService.Setup(h => h.DecodeValue(HashedAccountId)).Returns(AccountId); _mediator.Setup(x => x.SendAsync(It.IsAny <GetEmployerAccountHashedQuery>())) .ReturnsAsync(_response); _hashingService.Setup(h => h.DecodeValue(HashedAccountId)).Returns(AccountId); SetupGetTransactionsResponse(2017, 5); _orchestrator = new EmployerAccountTransactionsOrchestrator(_accountApiClient.Object, _mediator.Object, _currentTime.Object, Mock.Of <ILog>()); }
public void Arrange() { _mediator = new Mock <IMediator>(); _currentTime = new Mock <ICurrentDateTime>(); _response = new GetEmployerAccountResponse { Account = new Account { HashedId = HashedAccountId, Name = "Test Account" } }; _mediator.Setup(x => x.SendAsync(It.IsAny <GetEmployerAccountHashedQuery>())) .ReturnsAsync(_response); _mediator.Setup(x => x.SendAsync(It.IsAny <GetEmployerAccountTransactionsQuery>())) .ReturnsAsync(new GetEmployerAccountTransactionsResponse { Data = new AggregationData { TransactionLines = new List <TransactionLine> { new LevyDeclarationTransactionLine() } }, AccountHasPreviousTransactions = true }); _orchestrator = new EmployerAccountTransactionsOrchestrator(_mediator.Object, _currentTime.Object); }