public AccountInfoTests() { var config = new MapperConfiguration(cfg => { cfg.AddProfile(new WebApi.Mappings.AutoMapper()); }); var mapper = config.CreateMapper(); IQueryable <Customer> customersData = new List <Customer> { new Customer { FirstName = "Rena", LastName = "Markiewitz", Email = "*****@*****.**", CustomerId = new Guid("E7775225-9C97-4460-D971-08D82BD1D7C5"), Password = "******", Salt = "/PAaJXFGVGOxEWdGHv9TD+P6s9DaYmTws8ZMUkCp9Ow=" }, }.AsQueryable(); var accountsData = new List <Data.Entities.Account> { new Data.Entities.Account { AccountId = new Guid("9CFE55DF-65E2-4204-BAD5-08D82BD21687"), Balance = 1000000, Customer = customersData.FirstOrDefault(c => c.CustomerId == new Guid("E7775225-9C97-4460-D971-08D82BD1D7C5")), OpenDate = Convert.ToDateTime("2020-07-19 13:03:43.4326053"), CustomerId = new Guid("E7775225-9C97-4460-D971-08D82BD1D7C5") }, }.AsQueryable(); var emailVerificationsData = new List <EmailVerification> { new EmailVerification { Email = "*****@*****.**", VerificationCode = 1234, ExpirationTime = DateTime.Now.AddDays(1) }, }.AsQueryable(); var context = new Mock <AccountContext>(); context.SetupGet(x => x.Customers).Returns(MockDBSetExtensions.GetDbSet(customersData).Object); context.SetupGet(x => x.Accounts).Returns(MockDBSetExtensions.GetDbSet(accountsData).Object); context.SetupGet(x => x.EmailVerifications).Returns(MockDBSetExtensions.GetDbSet(emailVerificationsData).Object); var accountInfoRepository = new AccountInfoRepository(context.Object, mapper); _service = new AccountInfoService(accountInfoRepository); }
private void AssertAccountFundTransferAccountExists(IAccountInfoService accountService, string accountNumber) { if (!accountService.AccountNumberExists(accountNumber)) { throw new InactiveAccountFundTransferException(AccountDoesNotExisteption, Id, accountNumber); } }
public ShellViewModel(IShellView view, IAccountInfoService accountInfoService) : base(view) { AccountInfoService = accountInfoService; messages = new ObservableCollection <KeyValuePair <string, Exception> >(); Messages = new ReadOnlyObservableList <KeyValuePair <string, Exception> >(messages); CloseMessageCommand = new DelegateCommand(CloseMessage); messages.CollectionChanged += MessagesCollectionChanged; }
public CheckoutController(IUserProfileService userProfileService, IOrderService orderService, IOfferService offerService, IAccountInfoService accountInfoService, IOrderStatusService orderStatusService, IBillingService billingService, ITransactionService transactionService, IIdentityMessageService identityMessageService, IWithdrawService withdrawService) { _orderStatusService = orderStatusService; _userProfileService = userProfileService; _orderService = orderService; _offerService = offerService; _accountInfoService = accountInfoService; _billingService = billingService; _transactionService = transactionService; _identityMessageService = identityMessageService; _withdrawService = withdrawService; }
public AccountInfoController(IAccountInfoService accountInfoService) { _accountInfoService = accountInfoService; }
public ResultController(IResultService resultService, IPdfGenerator pdfGenerator, IAccountInfoService accountInfoService) { _resultService = resultService; _accountInfoService = accountInfoService; _pdfGenerator = pdfGenerator; }
public ResultReport(IResultService resultService, IBudgetService budgetService, IAccountInfoService accountInfoService) { _resultService = resultService; _accountInfoService = accountInfoService; _budgetService = budgetService; }
public PdfGenerator(IResultService resultService, IBudgetService budgetService, IAccountInfoService accountInfoService) { _resultService = resultService; _accountInfoService = accountInfoService; _budgetService = budgetService; }
public LoginController(IMapper mapper, ILoginService loginService, IAccountInfoService accountInfoService) { _loginService = loginService; _mapper = mapper; _accountInfoService = accountInfoService; }
public AccountInfoController(IAccountInfoService accountInfoService) { _accountInfoService = accountInfoService; }
public ResultReport(IResultService resultService, IBudgetService budgetService, IAccountInfoService accountInfoService) { _resultService = resultService; _accountInfoService = accountInfoService; _budgetService = budgetService; }
public PdfGenerator(IResultService resultService, IBudgetService budgetService, IAccountInfoService accountInfoService) { _resultService = resultService; _accountInfoService = accountInfoService; _budgetService = budgetService; }