Beispiel #1
0
 public void TestCreationOfProductWithoutLoanCycles()
 {
     Currency currency = new Currency();
     currency.Id = 1;
     var nrp = new NonRepaymentPenaltiesNullableValues(100, 200, 10, 0.2);
     var entryFees = new List<EntryFee>();
     LoanProduct product = CreatePackage(
                                         "NewPackage", //package name
                                         null, //anticipatedTotalRepaymentPenalties
                                         3, //anticipatedTotalRepaymentPenaltiesMin
                                         6, //anticipatedTotalRepaymentPenaltiesMax
                                         4, //grace period
                                         null, //gracePeriodMin
                                         null, //gracePeriodMax
                                         0.2m, //interestRate
                                         null, //interesrRateMin
                                         null, //interestRateMax
                                         0, //NmbOfInstallments
                                         null, //NmbOfInstallmentsMin
                                         null, //NmbOfInstallmentsMax
                                         entryFees, //List<EntryFee>
                                         nrp, //NonRepaymentPenalties
                                         null, //NonRepaymentPenaltiesMin
                                         null, //NonRepaymentPenaltiesMax
                                         _monthly, //InstallmentType
                                         2000, //amount
                                         null, //amountMin
                                         null, //AmountMax
                                         null, //ExoticInstallmentsTable
                                         null, //cycleId
                                         null, //List<LoanAmountCycle>
                                         null, //List<RateCycle>
                                         null, //List<MaturityCycle>
                                         "CODE1", //ProductCode
                                         null, //List<ProductClientType>
                                         null, //amountUnderLoc
                                         null, //amountUnderLocMin
                                         null, //amountUnderLocMax
                                         1, //anticipatedPartialRRepaymentPenalties
                                         null, //anticipatedPartialRRepaymentPenaltiesMin
                                         null, //anticipatedPartialRRepaymentPenaltiesMax
                                         null, //compulsoryAmount
                                         null, //compulsoryAmountMin
                                         null, //compulsoryAmountMax
                                         currency
         );
     LoanProductManager productManager = new LoanProductManager(DataUtil.TESTDB);
     ProductServices productServices = new ProductServices(productManager);
     productServices.ParseFieldsAndCheckErrors(product, false);
 }
Beispiel #2
0
        public void TestProductWithoutRateCycle()
        {
            var loanAmountCycles = GetLoanAmountCycles();
            var maturityCycles = GetMaturityCycles();

            var rateCycles = new List<RateCycle>();

            var entryFees = new List<EntryFee>();

            var nrp = new NonRepaymentPenaltiesNullableValues(200,100,20,1);

            var currency = new Currency();
            currency.Id = 1;

            LoanProduct product = CreatePackage(
                                                "NewPackage", //package name
                                                null, //anticipatedTotalRepaymentPenalties
                                                3, //anticipatedTotalRepaymentPenaltiesMin
                                                6, //anticipatedTotalRepaymentPenaltiesMax
                                                4, //grace period
                                                null, //gracePeriodMin
                                                null, //gracePeriodMax
                                                null, //interestRate
                                                null, //interesrRateMin
                                                null, //interestRateMax
                                                null, //NmbOfInstallments
                                                null, //NmbOfInstallmentsMin
                                                null, //NmbOfInstallmentsMax
                                                entryFees, //List<EntryFee>
                                                nrp, //NonRepaymentPenalties
                                                null, //NonRepaymentPenaltiesMin
                                                null, //NonRepaymentPenaltiesMax
                                                _monthly, //InstallmentType
                                                null, //amount
                                                null, //amountMin
                                                null, //AmountMax
                                                null, //ExoticInstallmentsTable
                                                1, //cycleId
                                                loanAmountCycles, //List<LoanAmountCycle>
                                                rateCycles, //List<RateCycle>
                                                maturityCycles, //List<MaturityCycle>
                                                "CODE1", //ProductCode
                                                null, //List<ProductClientType>
                                                null, //amountUnderLoc
                                                null, //amountUnderLocMin
                                                null, //amountUnderLocMax
                                                10, //anticipatedPartialRRepaymentPenalties
                                                null, //anticipatedPartialRRepaymentPenaltiesMin
                                                null, //anticipatedPartialRRepaymentPenaltiesMax
                                                null, //compulsoryAmount
                                                null, //compulsoryAmountMin
                                                null, //compulsoryAmountMax
                                                currency //Currency
                );
            ProductServices productServices = new ProductServices(new User() {Id = 1});
            productServices.ParseFieldsAndCheckErrors(product, false);
        }