Ejemplo n.º 1
0
 public ProductServices(User user)
 {
     _user = user;
     _productManager = new LoanProductManager(user);
     _installmentTypeManager = new InstallmentTypeManager(user);
     _fundingLineManager = new FundingLineManager(user);
     _productManager.ProductLoaded += ProductLoaded;
 }
Ejemplo n.º 2
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}
                            };
        }
Ejemplo n.º 3
0
 public ProductServices(InstallmentTypeManager installmentTypeManager)
 {
     _installmentTypeManager = installmentTypeManager;
 }
Ejemplo n.º 4
0
        public void FindAllInstallmentTypes()
        {
            List<InstallmentType> list = new List<InstallmentType>();
            list.Add(_monthly);
            list.Add(_biWeekly);
            mockInstallmentTypeManagement.SetReturnValue("SelectAllInstallmentTypes",list);
            installmentTypeManagement = (InstallmentTypeManager)mockInstallmentTypeManagement.MockInstance;
            ProductServices productServices = new ProductServices(installmentTypeManagement);

            Assert.AreEqual(2, productServices.FindAllInstallmentTypes().Count);
        }
Ejemplo n.º 5
0
        public void FindAllInstallmentsTypesWhenNoResult()
        {
            List<InstallmentType> list = new List<InstallmentType>();

            mockInstallmentTypeManagement.SetReturnValue("SelectAllInstallmentTypes", list);
            installmentTypeManagement = (InstallmentTypeManager)mockInstallmentTypeManagement.MockInstance;
            ProductServices productServices = new ProductServices(installmentTypeManagement);

            Assert.AreEqual(0, productServices.FindAllInstallmentTypes().Count);
        }
Ejemplo n.º 6
0
 public ProductServices(User user)
 {
     _user = user;
     _productManager = new LoanProductManager(user);
     _installmentTypeManager = new InstallmentTypeManager(user);
     _fundingLineManager = new FundingLineManager(user);
     _productManager.ProductLoaded += ProductLoaded;
     MefContainer.Current.Bind(this);
 }
Ejemplo n.º 7
0
 public ProductServices(InstallmentTypeManager installmentTypeManager)
 {
     _installmentTypeManager = installmentTypeManager;
     MefContainer.Current.Bind(this);
 }
Ejemplo n.º 8
0
 public SavingProductServices(User user)
 {
     _user = user;
     _savingProductManager = new SavingProductManager(user);
     _installmentTypeManager = new InstallmentTypeManager(user);
 }