public void Should_return_1001_for_Basis_when_Income_is_1000_01()
        {
            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(1001m, resultValue);
        }
Exemplo n.º 2
0
        public void Should_return_350_for_Payment_when_Basis_is_10_000_CZK_and_Garant_Scheme_is_ON()
        {
            IEnginesHistory <ISocialEngine> engines = SocialEnginesHistory.CreateEngines();

            ISocialEngine engine = engines.ResolveEngine(testPeriod);

            decimal testEmployeeBasis = 10000m;

            bool testNegativeSuppress = true;

            decimal resultValue = engine.EmployeePensionContribution(testPeriod,
                                                                     testNegativeSuppress, testEmployeeBasis);

            Assert.AreEqual(350m, resultValue);
        }
Exemplo n.º 3
0
        public void Should_return_391_for_Payment_when_Basis_is_6_003_CZK()
        {
            IEnginesHistory <ISocialEngine> engines = SocialEnginesHistory.CreateEngines();

            ISocialEngine engine = engines.ResolveEngine(testPeriod);

            decimal testEmployeeBasis = 6003m;

            bool testNegativeSuppress = true;

            decimal resultValue = engine.EmployeeRegularContribution(testPeriod,
                                                                     testNegativeSuppress, testEmployeeBasis);

            Assert.AreEqual(391m, resultValue);
        }
Exemplo n.º 4
0
        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);
        }
Exemplo n.º 5
0
        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);
        }
Exemplo n.º 6
0
        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);
        }
Exemplo n.º 7
0
        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);
        }
        public EngineProfile(MonthPeriod payrunPeriod, IPeriodEngine period, ITaxingEngine taxing, IHealthEngine health, ISocialEngine social)
        {
            __payrunPeriod = payrunPeriod;

            __periodEngine = period;

            __taxingEngine = taxing;

            __healthEngine = health;

            __socialEngine = social;
        }