public ApplicationSettingsServices(string pTestDb)
 {
     _dataParamManager        = new ApplicationSettingsManager(pTestDb);
     _nonWorkingDateManager   = new NonWorkingDateManagement(pTestDb);
     _provisioningRuleManager = new ProvisioningRuleManager(pTestDb);
     _loanScaleManager        = new LoanScaleManager(pTestDb);
 }
 public ApplicationSettingsServices(User pUser)
 {
     _user                    = pUser;
     _dataParamManager        = new ApplicationSettingsManager(pUser);
     _nonWorkingDateManager   = new NonWorkingDateManagement(pUser);
     _provisioningRuleManager = new ProvisioningRuleManager(pUser);
     _loanScaleManager        = new LoanScaleManager(_user);
 }
 public ChartOfAccountsServices(string testDB)
 {
     _accountManagement        = new AccountManager(testDB);
     _provisionningRuleManager = new ProvisioningRuleManager(testDB);
     _tellerManager            = new TellerManager(testDB);
     _loanScaleManager         = new LoanScaleManager(testDB);
     _currencyManager          = new CurrencyManager(testDB);
     ConnectionManager.GetInstance(testDB);
 }
 public ChartOfAccountsServices(User pUser)
 {
     _user = pUser;
     _accountManagement        = new AccountManager(pUser);
     _tellerManager            = new TellerManager(pUser);
     _provisionningRuleManager = new ProvisioningRuleManager(pUser);
     _loanScaleManager         = new LoanScaleManager(pUser);
     _currencyManager          = new CurrencyManager(pUser);
 }
        public void AddProvisionningRateInDatabase()
        {
            ProvisioningRuleManager provisioningRuleManager = (ProvisioningRuleManager)container["ProvisioningRuleManager"];
            ProvisioningRate        rate = new ProvisioningRate {
                Number = 12, NbOfDaysMin = 1000, NbOfDaysMax = 1111, ProvisioningValue = 2, ProvisioningInterest = 2, ProvisioningPenalty = 2
            };
            SqlTransaction transaction = provisioningRuleManager.GetConnection().BeginTransaction();

            provisioningRuleManager.AddProvisioningRate(rate, transaction);
            transaction.Commit();
        }
        public void TestDeleteProvisionningRules()
        {
            ProvisioningRuleManager provisioningRuleManager = (ProvisioningRuleManager)container["ProvisioningRuleManager"];
            SqlTransaction          transaction             = provisioningRuleManager.GetConnection().BeginTransaction();

            provisioningRuleManager.DeleteAllProvisioningRules(transaction);
            transaction.Commit();

            List <ProvisioningRate> list = provisioningRuleManager.SelectAllProvisioningRates();

            Assert.AreEqual(0, list.Count);
        }
示例#7
0
        public void InitManager()
        {
            TechnicalSettings.CheckSettings();

            LoanProductManager           loanProductManager           = new LoanProductManager(DataUtil.TESTDB);
            AccountingTransactionManager accountingTransactionManager = new AccountingTransactionManager(DataUtil.TESTDB);
            EventManager            eventManager            = new EventManager(DataUtil.TESTDB);
            ExchangeRateManager     exchangeRateManager     = new ExchangeRateManager(DataUtil.TESTDB);
            ProvisioningRuleManager provisioningRuleManager = new ProvisioningRuleManager(DataUtil.TESTDB);
            AccountManager          accountManager          = new AccountManager(DataUtil.TESTDB);
            InstallmentTypeManager  installmentTypeManager  = new InstallmentTypeManager(DataUtil.TESTDB);
            UserManager             userManager             = new UserManager(DataUtil.TESTDB);
            EconomicActivityManager economicActivityManager = new EconomicActivityManager(DataUtil.TESTDB);
            InstallmentManager      installmentManager      = new InstallmentManager(DataUtil.TESTDB);
            FundingLineManager      fundingLineManager      = new FundingLineManager(DataUtil.TESTDB);
            ClientManager           clientManager           = new ClientManager(DataUtil.TESTDB);
            LocationsManager        locationsManager        = new LocationsManager(DataUtil.TESTDB);
            LoanManager             loanManager             = new LoanManager(DataUtil.TESTDB);
            ProjectManager          projectManager          = new ProjectManager(DataUtil.TESTDB);
            MFIManager            mfiManager            = new MFIManager(DataUtil.TESTDB);
            SavingManager         savingManager         = new SavingManager(DataUtil.TESTDB);
            SavingProductManager  savingProductManager  = new SavingProductManager(DataUtil.TESTDB);
            SavingEventManager    savingEventManager    = new SavingEventManager(DataUtil.TESTDB);
            CurrencyManager       currencyManager       = new CurrencyManager(DataUtil.TESTDB);
            AccountingRuleManager accountingRuleManager = new AccountingRuleManager(DataUtil.TESTDB);
            FundingLineServices   fundingLineServices   = new FundingLineServices(DataUtil.TESTDB);

            container = new Hashtable
            {
                { "LoanProductManager", loanProductManager },
                { "AccountingTransactionManager", accountingTransactionManager },
                { "EventManager", eventManager },
                { "ExchangeRateManager", exchangeRateManager },
                { "ProvisioningRuleManager", provisioningRuleManager },
                { "AccountManager", accountManager },
                { "InstallmentTypeManager", installmentTypeManager },
                { "UserManager", userManager },
                { "FundingLineManager", fundingLineManager },
                { "LoanManager", loanManager },
                { "ClientManager", clientManager },
                { "LocationsManager", locationsManager },
                { "ProjectManager", projectManager },
                { "EconomicActivityManager", economicActivityManager },
                { "InstallmentManager", installmentManager },
                { "MFIManager", mfiManager },
                { "SavingManager", savingManager },
                { "SavingProductManager", savingProductManager },
                { "SavingEventManager", savingEventManager },
                { "CurrencyManager", currencyManager },
                { "FundingLineServices", fundingLineServices },
                { "AccountingRuleManager", accountingRuleManager }
            };
        }
        public void SelectProvisioningRates()
        {
            ProvisioningRuleManager provisioningRuleManager = (ProvisioningRuleManager)container["ProvisioningRuleManager"];
            List <ProvisioningRate> list = provisioningRuleManager.SelectAllProvisioningRates();

            Assert.AreEqual(7, list.Count);

            _AssertProvisioningRule(list[0], 1, 0, 0, 0.02, 0, 0);
            _AssertProvisioningRule(list[1], 2, 1, 30, 0.1, 0, 0);
            _AssertProvisioningRule(list[2], 3, 31, 60, 0.25, 0, 0);
            _AssertProvisioningRule(list[3], 4, 61, 90, 0.5, 0, 0);
            _AssertProvisioningRule(list[4], 5, 91, 180, 0.75, 0, 0);
            _AssertProvisioningRule(list[5], 6, 181, 365, 1, 0, 0);
            _AssertProvisioningRule(list[6], 7, 366, 99999, 1, 0, 0);
        }