コード例 #1
0
        public void PermanentContract__SalaryGross_eq__SocialInsuranceCost_eq(
            decimal salaryGross,
            decimal expectedValue)
        {
            // arrange
            var setting = EmployeeExampleValues.SocialInsuranceSetting;
            var builder = new EmployeeSalaryCalculationResultBuilder();

            // act
            var result = builder
                         .SetSalaryGross(salaryGross)
                         .CreateResult()
                         .CalculateSocialInsurance(setting)
                         .Result
                         .TotalSocialInsurance;

            // assert
            result.Should().Be(expectedValue);
        }
コード例 #2
0
        public void PermanentContract__SalaryGross_eq__HealthInsurance_eq(
            decimal salaryGross,
            decimal expectedHealthInsurance,
            decimal expectedHealthInsuranceDeductibles)
        {
            // arrange
            var socialSetting = EmployeeExampleValues.SocialInsuranceSetting;
            var healthSetting = EmployeeExampleValues.HealthInsuranceSetting;
            var builder       = new EmployeeSalaryCalculationResultBuilder();

            // act
            var result = builder
                         .SetSalaryGross(salaryGross)
                         .CreateResult()
                         .CalculateSocialInsurance(socialSetting)
                         .CalculateHealthInsurance(builder.Result.TotalSocialInsurance, healthSetting)
                         .Result;

            // assert
            result.HealthInsurance.Should().Be(expectedHealthInsurance);
            result.HealthInsuranceDeductibles.Should().Be(expectedHealthInsuranceDeductibles);
        }
コード例 #3
0
        public void PermanentContract__SalaryGross_eq_and_CopyrightLawsPercent_eq_and__TaxBase_eq(
            decimal salaryGross,
            float copyrightLawsPercent,
            decimal expectedValue)
        {
            // arrange
            var setting = EmployeeExampleValues.SocialInsuranceSetting;
            var employmentRelationshipTaxDeductibles = EmployeeExampleValues.EmploymentRelationshipTaxSetting.DeductiblesAmount;
            var builder = new EmployeeSalaryCalculationResultBuilder();

            // act
            var result = builder
                         .SetSalaryGross(salaryGross)
                         .CreateResult()
                         .CalculateSocialInsurance(setting)
                         .CalculateTaxBase(copyrightLawsPercent, builder.Result.TotalSocialInsurance, employmentRelationshipTaxDeductibles)
                         .Result
                         .TaxBase;

            // assert
            result.Should().Be(expectedValue);
        }