Exemple #1
0
        protected EmployGuides(bool defaultGuides, int validFrom, int validUpto,
                               Int32 weeklyWorkingDays, Int32 dailyWorkingHours) :
            base(defaultGuides, validFrom, validUpto)
        {
            __weeklyWorkingDays = weeklyWorkingDays;

            __dailyWorkingHours = dailyWorkingHours;

            __dailyWorkingSeconds = PeriodOperations.WorkingSecondsDaily(__dailyWorkingHours);

            __weeklyWorkingSeconds = PeriodOperations.WorkingSecondsWeekly(__weeklyWorkingDays, __dailyWorkingHours);
        }
Exemple #2
0
        private PeriodGuides(
            uint validYear,
            Int32 weeklyWorkingDays,
            Int32 dailyWorkingHours) : base(validYear)
        {
            __weeklyWorkingDays = weeklyWorkingDays;

            __dailyWorkingHours = dailyWorkingHours;

            __dailyWorkingSeconds = PeriodOperations.WorkingSecondsDaily(__dailyWorkingHours);

            __weeklyWorkingSeconds = PeriodOperations.WorkingSecondsWeekly(__weeklyWorkingDays, __dailyWorkingHours);
        }
        public void Should_Return_Valid_Result_Stream()
        {
            WorkRelationTerms TEST_CONTRACT_TYPE = WorkRelationTerms.WORKTERM_EMPLOYMENT_1;

            WorkHealthTerms TEST_HEALTH_TYPE = WorkHealthTerms.HEALTH_TERM_EMPLOYMENT;

            WorkSocialTerms TEST_SOCIAL_TYPE = WorkSocialTerms.SOCIAL_TERM_EMPLOYMENT;

            ITargetValues contractValues = TargetValueBuilder.CreateContractEmplTermValues(
                TEST_CONTRACT_TYPE, TEST_HEALTH_TYPE, TEST_SOCIAL_TYPE, null, null);

            ITargetValues positionValues = TargetValueBuilder.CreatePositionEmplTermValues(null, null);

            Int32 weeklyWorkDaysScheduled = 5;
            Int32 weeklyWorkTimeInSeconds = PeriodOperations.WorkingSecondsWeekly(weeklyWorkDaysScheduled, 8);

            ITargetValues positionSchedule = TargetValueBuilder.CreateScheduleWorkValues(weeklyWorkTimeInSeconds, weeklyWorkDaysScheduled);

            ITargetValues positionSalary = TargetValueBuilder.CreateSalaryBaseValues(15000m);

            ITargetValues emptyValues = TargetValueBuilder.CreateEmptyValues();

            ITargetStream targets = TargetStream.CreateEmptyStream().
                                    AddNewContractsTarget(ConfigSetCzArticleName.REF_CONTRACT_EMPL_TERM, contractValues, testConfig).
                                    AddNewPositionsTarget(ConfigSetCzArticleName.REF_POSITION_EMPL_TERM, positionValues, testConfig).
                                    AddTargetIntoPosition(ConfigSetCzArticleName.REF_SALARY_BASE, positionSalary, testConfig).
                                    AddTargetIntoPosition(ConfigSetCzArticleName.REF_SCHEDULE_WORK, positionSchedule, testConfig).
                                    AddTargetIntoContract(ConfigSetCzArticleName.REF_INCOME_GROSS, emptyValues, testConfig);

            IEngineProfile testProfile = testEngine.BuildEngineProfile(testPeriod);

            IProcessService testModule = ProcessServiceModule.CreateModule(targets, testConfig, testProfile, serviceLog);

            IResultStream results = testModule.EvaluateTargetsToResults();

            serviceLog.CloseLogStream();

            Assert.AreEqual(0, results.Results().Keys.Count);
        }