public void Should_return_SocialEngine2015_for_DefaultEngine_when_Year_2015() { IEnginesHistory <ISocialEngine> engines = SocialEnginesHistory.CreateEngines(); ISocialEngine engine2015 = engines.DefaultEngine(); Assert.AreEqual(FULL_CLASS_NAME_2015, engine2015.GetType().ToString()); }
public void Should_return_Maximum_Constants_for_Social_Engine_when_Year_2013() { IEnginesHistory <ISocialEngine> engines = SocialEnginesHistory.CreateEngines(); ISocialEngine engine = engines.ResolveEngine(testPeriod); Assert.AreEqual(1242432m, engine.PeriodMaximumAnnualBasis(testPeriod)); }
public void Should_return_Minimum_Constants_for_Social_Engine_when_Year_2012() { IEnginesHistory <ISocialEngine> engines = SocialEnginesHistory.CreateEngines(); ISocialEngine engine = engines.ResolveEngine(testPeriod); Assert.AreEqual(0, engine.PeriodMandatoryBasis(testPeriod)); }
private EngineServiceModule() { HistoryOfPeriod = PeriodEnginesHistory.CreateEngines(); HistoryOfTaxing = TaxingEnginesHistory.CreateEngines(); HistoryOfHealth = HealthEnginesHistory.CreateEngines(); HistoryOfSocial = SocialEnginesHistory.CreateEngines(); }
public void Should_return_SocialEngine2011_for_ClassNameEngine_when_Year_2011() { IEnginesHistory <ISocialEngine> engines = SocialEnginesHistory.CreateEngines(); MonthPeriod period2011 = new MonthPeriod(2011, 1); ISocialEngine engine2011 = engines.ResolveEngine(period2011); Assert.AreEqual(FULL_CLASS_NAME_2011, engine2011.GetType().ToString()); }
private CountryServiceModule() { Assembly serviceModuleAssembly = this.GetType().Assembly; HistoryOfEmploy = EmployEnginesHistory.CreateEngines(serviceModuleAssembly); HistoryOfTaxing = TaxingEnginesHistory.CreateEngines(serviceModuleAssembly); HistoryOfHealth = HealthEnginesHistory.CreateEngines(serviceModuleAssembly); HistoryOfSocial = SocialEnginesHistory.CreateEngines(serviceModuleAssembly); }
public void Should_return_Factor_Constants_for_Social_Engine_when_Year_2013() { IEnginesHistory <ISocialEngine> engines = SocialEnginesHistory.CreateEngines(); ISocialEngine engine = engines.ResolveEngine(testPeriod); Assert.AreEqual(6.5m, engine.PeriodEmployeeFactor(testPeriod, PENSION_SCHEME_NON)); Assert.AreEqual(3.5m, engine.PeriodEmployeeFactor(testPeriod, PENSION_SCHEME_YES)); Assert.AreEqual(5.0m, engine.PeriodEmployeeGarantFactor(testPeriod)); Assert.AreEqual(3.0m, engine.PeriodPensionsReduceFactor(testPeriod)); Assert.AreEqual(25.0m, engine.PeriodEmployerFactor(testPeriod)); Assert.AreEqual(26.0m, engine.PeriodEmployerElevatedFactor(testPeriod)); }
public void Should_return_10_000_for_Garant_Basis_when_Basis_is_10_000_CZK_and_Garant_Scheme_is_ON() { IEnginesHistory <ISocialEngine> engines = SocialEnginesHistory.CreateEngines(); ISocialEngine engine = engines.ResolveEngine(testPeriod); decimal testEmployeeBasis = 10000m; decimal resultValue = engine.PensionCalculatedBasis(testPeriod, GARANT_SCHEME_YES, testEmployeeBasis); Assert.AreEqual(10000m, resultValue); }
public void Should_return_ZERO_for_Payment_when_Basis_is_0_CZK_and_Garant_Scheme_is_ON() { IEnginesHistory <ISocialEngine> engines = SocialEnginesHistory.CreateEngines(); ISocialEngine engine = engines.ResolveEngine(testPeriod); decimal testEmployeeBasis = 0m; bool testNegativeSuppress = true; decimal resultValue = engine.EmployeePensionContribution(testPeriod, testNegativeSuppress, testEmployeeBasis); Assert.AreEqual(0m, resultValue); }
public void Should_return_10_000_for_Cap_when_Basis_is_10_100_and_Accumulated_Basis_is_1_277_228() { IEnginesHistory <ISocialEngine> engines = SocialEnginesHistory.CreateEngines(); ISocialEngine engine = engines.ResolveEngine(testPeriod); decimal testAktualMonthBasis = 10100m; decimal testAccumulatedBasis = 1277228m; decimal resultValue = engine.BasisLegalCapBalance(testPeriod, testAccumulatedBasis, testAktualMonthBasis); Assert.AreEqual(10000m, resultValue); }
public void Should_return_Zero_for_Selector_when_Income_is_1000_and_Participation_is_False() { IEnginesHistory <ISocialEngine> engines = SocialEnginesHistory.CreateEngines(); ISocialEngine engine = engines.ResolveEngine(testPeriod); bool testInsParticip = false; decimal testIncome = 1000m; decimal resultValue = engine.ParticipSocialSelector(testPeriod, testInsParticip, testIncome); Assert.AreEqual(0, resultValue); }
public void Should_return_Zero_for_Basis_when_Income_is_Negative_1000_01_and_Negative_Payments_is_False() { IEnginesHistory <ISocialEngine> engines = SocialEnginesHistory.CreateEngines(); ISocialEngine engine = engines.ResolveEngine(testPeriod); bool testNegativeSuppress = true; decimal testIncome = -1000.01m; decimal resultValue = engine.BasisGeneralAdapted(testPeriod, testNegativeSuppress, testIncome); Assert.AreEqual(0, resultValue); }
public void Should_return_500_for_Payment_when_Basis_is_10_000_CZK() { IEnginesHistory <ISocialEngine> engines = SocialEnginesHistory.CreateEngines(); ISocialEngine engine = engines.ResolveEngine(testPeriod); decimal testEmployeeBasis = 10000m; bool testNegativeSuppress = true; decimal resultValue = engine.EmployeeGarantContribution(testPeriod, testNegativeSuppress, testEmployeeBasis); Assert.AreEqual(500m, resultValue); }
public void Should_return_Zero_for_Selector_when_Income_is_1000_and_Select_Article_is_False() { IEnginesHistory <ISocialEngine> engines = SocialEnginesHistory.CreateEngines(); ISocialEngine engine = engines.ResolveEngine(testPeriod); bool testInsSubject = true; bool testInsArticle = false; decimal testIncome = 1000m; decimal resultValue = engine.SubjectSocialSelector(testPeriod, testInsSubject, testInsArticle, testIncome); Assert.AreEqual(0, resultValue); }
public void Should_return_FALSE_for_Participation_when_WorkTerm_is_Employment_With_Small_Work_and_Income_is_2_499_CZK() { IEnginesHistory <ISocialEngine> engines = SocialEnginesHistory.CreateEngines(); ISocialEngine engine = engines.ResolveEngine(testPeriod); WorkRelationTerms termOfWork = WorkRelationTerms.WORKTERM_EMPLOYMENT_1; WorkSocialTerms termOfSocial = WorkSocialTerms.SOCIAL_TERM_SMALL_EMPL; decimal testContractIncome = 0m; decimal testWorkTermIncome = 2499m; decimal testTotalTaxIncome = 2499m; bool resultValue = engine.ParticipateSocialIncome(testPeriod, termOfWork, termOfSocial, testContractIncome, testWorkTermIncome, testTotalTaxIncome); Assert.AreEqual(false, resultValue); }
public void Should_return_FALSE_for_Participation_when_WorkTerm_is_AgreementTasks_and_Income_is_9_999_CZK() { IEnginesHistory <ISocialEngine> engines = SocialEnginesHistory.CreateEngines(); ISocialEngine engine = engines.ResolveEngine(testPeriod); WorkRelationTerms termOfWork = WorkRelationTerms.WORKTERM_CONTRACTER_T; WorkSocialTerms termOfSocial = WorkSocialTerms.SOCIAL_TERM_EMPLOYMENT; decimal testContractIncome = 0m; decimal testWorkTermIncome = 9999m; decimal testTotalTaxIncome = 9999m; bool resultValue = engine.ParticipateSocialIncome(testPeriod, termOfWork, termOfSocial, testContractIncome, testWorkTermIncome, testTotalTaxIncome); Assert.AreEqual(false, resultValue); }
public void Should_Throw_EngineException_when_WorkTerm_is_Employment_With_Short_Work_Deny_and_Income_is_2_499_CZK() { IEnginesHistory <ISocialEngine> engines = SocialEnginesHistory.CreateEngines(); ISocialEngine engine = engines.ResolveEngine(testPeriod); WorkRelationTerms termOfWork = WorkRelationTerms.WORKTERM_EMPLOYMENT_1; WorkSocialTerms termOfSocial = WorkSocialTerms.SOCIAL_TERM_SHORT_DENY; decimal testContractIncome = 0m; decimal testWorkTermIncome = 2499m; decimal testTotalTaxIncome = 2499m; TestDelegate testDelegateCode = () => { engine.ParticipateSocialIncome(testPeriod, termOfWork, termOfSocial, testContractIncome, testWorkTermIncome, testTotalTaxIncome); }; Assert.Throws <EngineServicePeriodException> (testDelegateCode); }