public void Setup()
        {
            _withdrawAddressRepository = (IWithdrawAddressRepository)ContextRegistry.GetContext()["WithdrawAddressRepository"];
            _persistanceRepository     = (IFundsPersistenceRepository)ContextRegistry.GetContext()["FundsPersistenceRepository"];

            var connection = ConfigurationManager.ConnectionStrings["MySql"].ToString();

            _databaseUtility = new DatabaseUtility(connection);
            _databaseUtility.Create();
            _databaseUtility.Populate();
        }
Example #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="T:System.Object"/> class.
        /// </summary>
        public WithdrawApplicationService(IFundsPersistenceRepository fundsPersistenceRepository,
                                          IWithdrawAddressRepository withdrawAddressRepository,
                                          IFundsValidationService fundsValidationService, IWithdrawRepository withdrawRepository,
                                          IClientInteractionService clientInteractionService, IDepositAddressRepository depositAddressRepository,
                                          IWithdrawLimitRepository withdrawLimitRepository, IBalanceRepository balanceRepository)
        {
            _fundsPersistenceRepository = fundsPersistenceRepository;
            _withdrawAddressRepository  = withdrawAddressRepository;
            _fundsValidationService     = fundsValidationService;
            _withdrawRepository         = withdrawRepository;
            _withdrawSubmissionService  = clientInteractionService;
            _depositAddressRepository   = depositAddressRepository;
            _withdrawLimitRepository    = withdrawLimitRepository;
            _balanceRepository          = balanceRepository;

            _withdrawSubmissionService.WithdrawExecuted += this.WithdrawExecuted;
        }