public void TestFixtureSetUp()
 {
     ProvisionTable provisionTable = ProvisionTable.GetInstance(new User());
     provisionTable.Add(new ProvisioningRate { Number = 1, NbOfDaysMin = 0, NbOfDaysMax = 30, ProvisioningValue = 10, ProvisioningInterest = 10, ProvisioningPenalty = 10 });
     provisionTable.Add(new ProvisioningRate { Number = 2, NbOfDaysMin = 31, NbOfDaysMax = 60, ProvisioningValue = 25, ProvisioningInterest = 25, ProvisioningPenalty = 25 });
     provisionTable.Add(new ProvisioningRate { Number = 3, NbOfDaysMin = 61, NbOfDaysMax = 90, ProvisioningValue = 50, ProvisioningInterest = 50, ProvisioningPenalty = 50 });
     provisionTable.Add(new ProvisioningRate { Number = 4, NbOfDaysMin = 91, NbOfDaysMax = 180, ProvisioningValue = 75, ProvisioningInterest = 75, ProvisioningPenalty = 75 });
     provisionTable.Add(new ProvisioningRate { Number = 5, NbOfDaysMin = 181, NbOfDaysMax = 365, ProvisioningValue = 100, ProvisioningInterest = 100, ProvisioningPenalty = 100 });
     provisionTable.Add(new ProvisioningRate { Number = 6, NbOfDaysMin = 366, NbOfDaysMax = 99999, ProvisioningValue = 100, ProvisioningInterest = 100, ProvisioningPenalty = 100 });
     nonWorkingDateHelper = NonWorkingDateSingleton.GetInstance("");
     nonWorkingDateHelper.WeekEndDay1 = 6;
     nonWorkingDateHelper.WeekEndDay2 = 0;
     nonWorkingDateHelper.PublicHolidays = new Dictionary<DateTime, string>
                                               {
                                                   {new DateTime(2006, 1, 1), "New Year Eve"},
                                                   {new DateTime(2006, 12, 25), "Christmas"}
                                               };
     dataParam = ApplicationSettings.GetInstance("");
     dataParam.DeleteAllParameters();
     dataParam.AddParameter(OGeneralSettings.PAYFIRSTINSTALLMENTREALVALUE, true);
     dataParam.AddParameter(OGeneralSettings.OLBBEFOREREPAYMENT, true);
     dataParam.AddParameter(OGeneralSettings.DONOTSKIPWEEKENDSININSTALLMENTSDATE, false);
     dataParam.AddParameter(OGeneralSettings.INCREMENTALDURINGDAYOFF, true);
 }
        public void TestFixtureSetUp()
        {
            nonWorkingDateHelper = NonWorkingDateSingleton.GetInstance("");
            nonWorkingDateHelper.WeekEndDay1 = 6;
            nonWorkingDateHelper.WeekEndDay2 = 0;
            nonWorkingDateHelper.PublicHolidays = new Dictionary<DateTime, string>();
            nonWorkingDateHelper.PublicHolidays.Add(new DateTime(2006,1,1),"New Year Eve");
            nonWorkingDateHelper.PublicHolidays.Add(new DateTime(2006,3,8),"New Year Eve");
            nonWorkingDateHelper.PublicHolidays.Add(new DateTime(2006,3,21),"New Year Eve");
            nonWorkingDateHelper.PublicHolidays.Add(new DateTime(2006,3,22),"New Year Eve");
            nonWorkingDateHelper.PublicHolidays.Add(new DateTime(2006,5,1),"New Year Eve");
            nonWorkingDateHelper.PublicHolidays.Add(new DateTime(2006,5,9),"New Year Eve");
            nonWorkingDateHelper.PublicHolidays.Add(new DateTime(2006,6,27),"New Year Eve");
            nonWorkingDateHelper.PublicHolidays.Add(new DateTime(2006,9,9),"New Year Eve");
            nonWorkingDateHelper.PublicHolidays.Add(new DateTime(2006,11,6),"New Year Eve");
            nonWorkingDateHelper.PublicHolidays.Add(new DateTime(2006,11,26),"New Year Eve");
            nonWorkingDateHelper.PublicHolidays.Add(new DateTime(2006,1,6),"Christmas");

            _provisionningTable = ProvisionTable.GetInstance(new User());
            _provisionningTable.ProvisioningRates = new List<ProvisioningRate>();
            _provisionningTable.Add(new ProvisioningRate { Number = 1, NbOfDaysMin = 0, NbOfDaysMax = 0, ProvisioningValue = 0.02 });
            _provisionningTable.Add(new ProvisioningRate { Number = 2, NbOfDaysMin = 1, NbOfDaysMax = 30, ProvisioningValue = 0.1 });
            _provisionningTable.Add(new ProvisioningRate { Number = 3, NbOfDaysMin = 31, NbOfDaysMax = 60, ProvisioningValue = 0.25 });
            _provisionningTable.Add(new ProvisioningRate { Number = 4, NbOfDaysMin = 61, NbOfDaysMax = 90, ProvisioningValue = 0.5 });
            _provisionningTable.Add(new ProvisioningRate { Number = 5, NbOfDaysMin = 91, NbOfDaysMax = 180, ProvisioningValue = 0.75 });
            _provisionningTable.Add(new ProvisioningRate { Number = 6, NbOfDaysMin = 181, NbOfDaysMax = 365, ProvisioningValue = 1 });
            _provisionningTable.Add(new ProvisioningRate { Number = 7, NbOfDaysMin = 366, NbOfDaysMax = 99999, ProvisioningValue = 1 });

            dataParam = ApplicationSettings.GetInstance("");
            dataParam.DeleteAllParameters();

            dataParam.AddParameter(OGeneralSettings.CALCULATIONLATEFEESDURINGPUBLICHOLIDAYS, true);
            dataParam.AddParameter(OGeneralSettings.DONOTSKIPWEEKENDSININSTALLMENTSDATE, false);
            dataParam.AddParameter(OGeneralSettings.ACCOUNTINGPROCESS, OAccountingProcesses.Cash);
            dataParam.AddParameter(OGeneralSettings.INCREMENTALDURINGDAYOFF, true);
            dataParam.AddParameter(OGeneralSettings.PAYFIRSTINSTALLMENTREALVALUE, true);
            dataParam.AddParameter(OGeneralSettings.STOP_WRITEOFF_PENALTY, true);
            dataParam.AddParameter(OGeneralSettings.BAD_LOAN_DAYS, "180");
            dataParam.AddParameter(OGeneralSettings.INTEREST_RATE_DECIMAL_PLACES, 2);
            dataParam.AddParameter(OGeneralSettings.USE_DAILY_ACCRUAL_OF_PENALTY, false);
        }
예제 #3
0
파일: TestLoan.cs 프로젝트: aelhadi/opencbs
        public void TestFixtureSetUp()
        {
            _generalSettings = ApplicationSettings.GetInstance("");
            _generalSettings.DeleteAllParameters();
            _generalSettings.AddParameter(OGeneralSettings.CALCULATIONLATEFEESDURINGPUBLICHOLIDAYS, true);
            _generalSettings.AddParameter(OGeneralSettings.DONOTSKIPWEEKENDSININSTALLMENTSDATE, false);
            _generalSettings.AddParameter(OGeneralSettings.INCREMENTALDURINGDAYOFF, true);
            _generalSettings.AddParameter(OGeneralSettings.PAYFIRSTINSTALLMENTREALVALUE, true);
            _generalSettings.AddParameter(OGeneralSettings.BAD_LOAN_DAYS, "180");
            _generalSettings.AddParameter(OGeneralSettings.STOP_WRITEOFF_PENALTY, true);
            _generalSettings.AddParameter(OGeneralSettings.USE_DAILY_ACCRUAL_OF_PENALTY, false);

            _provisionningTable = ProvisionTable.GetInstance(new User());
            _provisionningTable.ProvisioningRates = new List<ProvisioningRate>();
            _provisionningTable.Add(new ProvisioningRate { Number = 1, NbOfDaysMin = 0, NbOfDaysMax = 30, ProvisioningValue = 10 });
            _provisionningTable.Add(new ProvisioningRate { Number = 2, NbOfDaysMin = 31, NbOfDaysMax = 60, ProvisioningValue = 25 });
            _provisionningTable.Add(new ProvisioningRate { Number = 3, NbOfDaysMin = 61, NbOfDaysMax = 90, ProvisioningValue = 50 });
            _provisionningTable.Add(new ProvisioningRate { Number = 4, NbOfDaysMin = 91, NbOfDaysMax = 180, ProvisioningValue = 75 });
            _provisionningTable.Add(new ProvisioningRate { Number = 5, NbOfDaysMin = 181, NbOfDaysMax = 365, ProvisioningValue = 100 });
            _provisionningTable.Add(new ProvisioningRate { Number = 6, NbOfDaysMin = 366, NbOfDaysMax = 99999, ProvisioningValue = 100 });

            _nonWorkingDate = NonWorkingDateSingleton.GetInstance("");
            _nonWorkingDate.PublicHolidays = new Dictionary<DateTime, string>();
            _nonWorkingDate.WeekEndDay1 = 0;
            _nonWorkingDate.WeekEndDay2 = 1;
        }
예제 #4
0
 // MOCK
 public ClientServices(ClientManager clientManagement)
 {
     _clientManagement = clientManagement;
     _connectionManager = ConnectionManager.GetInstance(TESTDB);
     _dataParam = ApplicationSettings.GetInstance("");
     _picturesServices = new PicturesServices(TESTDB);
     _dataParam.DeleteAllParameters();
     _dataParam.AddParameter("GROUP_MIN_MEMBERS", 4);
     _dataParam.AddParameter("GROUP_MAX_MEMBERS", 10);
     _dataParam.AddParameter(OGeneralSettings.ALLOWSMULTIPLEGROUPS, 0);
     _dataParam.AddParameter("CITY_MANDATORY", true);
 }
 public void TestFixtureSetup()
 {
     _settings = ApplicationSettings.GetInstance(string.Empty);
     _settings.AddParameter("DONOT_SKIP_WEEKENDS_IN_INSTALLMENTS_DATE", false);
     _settings.AddParameter("INCREMENTAL_DURING_DAYOFFS", false);
 }
 public void TestFixtureSetUp()
 {
     nonWorkingDateHelper = NonWorkingDateSingleton.GetInstance("");
     nonWorkingDateHelper.WeekEndDay1 = 6;
     nonWorkingDateHelper.WeekEndDay2 = 0;
     nonWorkingDateHelper.PublicHolidays = new Dictionary<DateTime, string>();
     nonWorkingDateHelper.PublicHolidays.Add(new DateTime(2006,1,1),"New Year Eve");
     nonWorkingDateHelper.PublicHolidays.Add(new DateTime(2006,3,8),"New Year Eve");
     nonWorkingDateHelper.PublicHolidays.Add(new DateTime(2006,3,21),"New Year Eve");
     nonWorkingDateHelper.PublicHolidays.Add(new DateTime(2006,3,22),"New Year Eve");
     nonWorkingDateHelper.PublicHolidays.Add(new DateTime(2006,5,1),"New Year Eve");
     nonWorkingDateHelper.PublicHolidays.Add(new DateTime(2006,5,9),"New Year Eve");
     nonWorkingDateHelper.PublicHolidays.Add(new DateTime(2006,6,27),"New Year Eve");
     nonWorkingDateHelper.PublicHolidays.Add(new DateTime(2006,9,9),"New Year Eve");
     nonWorkingDateHelper.PublicHolidays.Add(new DateTime(2006,11,6),"New Year Eve");
     nonWorkingDateHelper.PublicHolidays.Add(new DateTime(2006,11,26),"New Year Eve");
     nonWorkingDateHelper.PublicHolidays.Add(new DateTime(2006,1,6),"Christmas");
     dataParam = ApplicationSettings.GetInstance("");
     dataParam.DeleteAllParameters();
     dataParam.AddParameter(OGeneralSettings.USECENTS, true);
     dataParam.AddParameter(OGeneralSettings.CALCULATIONLATEFEESDURINGPUBLICHOLIDAYS, true);
     dataParam.AddParameter(OGeneralSettings.DONOTSKIPWEEKENDSININSTALLMENTSDATE, false);
     dataParam.AddParameter(OGeneralSettings.ACCOUNTINGPROCESS, OAccountingProcesses.Cash);
     dataParam.AddParameter(OGeneralSettings.INCREMENTALDURINGDAYOFF, true);
 }