Example #1
0
 public void Setup()
 {
     _calculateINSSservice          = new CalculateINSSDiscountService();
     _calculateIRPFservice          = new CalculateIRPFDiscountService();
     _calculateFGTSservice          = new CalculateFGTSDiscountService();
     _calculateTranspVoucherService = new CalculateTransportationVoucherDiscountService();
 }
Example #2
0
        public async Task Setup()
        {
            FakeEmployeesRepository fakeEmployeesRepository = new FakeEmployeesRepository();

            Employee employee = new Employee();

            employee.name          = "John";
            employee.lastName      = "Doe";
            employee.document      = "124578";
            employee.grossWage     = 5000;
            employee.admissionDate = new System.DateTime(2019, 11, 06);
            employee.hasHealthPlan = true;
            employee.hasDentalPlan = true;
            employee.hasTransportationVouchersDiscount = true;

            _employee = await fakeEmployeesRepository.Create(employee);

            ShowEmployeeService showEmployeeService = new ShowEmployeeService(fakeEmployeesRepository);

            CalculateINSSDiscountService                  calculateINSSDiscountService                  = new CalculateINSSDiscountService();
            CalculateIRPFDiscountService                  calculateIRPFDiscountService                  = new CalculateIRPFDiscountService();
            CalculateHealthPlanDiscountService            calculateHealthPlanDiscountService            = new CalculateHealthPlanDiscountService();
            CalculateDentalPlanDiscountService            calculateDentalPlanDiscountService            = new CalculateDentalPlanDiscountService();
            CalculateTransportationVoucherDiscountService calculateTransportationVoucherDiscountService = new CalculateTransportationVoucherDiscountService();
            CalculateFGTSDiscountService                  calculateFGTSDiscountService                  = new CalculateFGTSDiscountService();

            _service = new BuildPaycheckService(
                showEmployeeService,
                new BuildPaycheckEntriesRemunarationService(),
                new BuildPaycheckEntriesDiscountService(
                    calculateINSSDiscountService,
                    calculateIRPFDiscountService,
                    calculateHealthPlanDiscountService,
                    calculateDentalPlanDiscountService,
                    calculateTransportationVoucherDiscountService,
                    calculateFGTSDiscountService
                    )
                );
        }