public async Task Handle_WithEmployeeNoDiscountsAndNoDependents_Succeeds()
        {
            // arrange
            const double expectedDeductionTotal     = 1000;
            const double expectedDeductionForPeriod = 38.46;

            var employee = new Employee
            {
                Id        = Guid.NewGuid(),
                FirstName = "Billy",
                LastName  = "Blanks"
            };

            var request = new GetPayrollDeductions.GetPayrollDeductions
            {
                EmployeeId = employee.Id
            };

            _employeeRepository.Setup(x => x.Get(It.Is <Guid>(g => g == employee.Id))).ReturnsAsync(employee);

            // act
            var result = await _handler.Handle(request, new CancellationToken());

            //assert
            Assert.Empty(result.Employee.Dependents);
            Assert.Equal(expectedDeductionTotal, result.DeductionDetail.AnnualDeductions);
            Assert.Equal(expectedDeductionForPeriod, result.DeductionDetail.PeriodDeductions);
        }
        public async Task Handle_WithNoEmployeeDiscountAndDependentDiscount_Succeeds()
        {
            // arrange
            const double expectedDeductionTotal     = 1900;
            const double expectedDeductionForPeriod = 73.08;

            var employee = new Employee
            {
                Id         = Guid.NewGuid(),
                FirstName  = "Billy",
                LastName   = "Baldwin",
                Dependents = new List <Dependent>
                {
                    new Dependent
                    {
                        FirstName = "Anna",
                        LastName  = "Doe",
                        Id        = Guid.NewGuid()
                    },
                    new Dependent
                    {
                        FirstName = "Alice",
                        LastName  = "AndChains",
                        Id        = Guid.NewGuid()
                    }
                }
            };

            var request = new GetPayrollDeductions.GetPayrollDeductions
            {
                EmployeeId = employee.Id
            };

            _employeeRepository.Setup(x => x.Get(It.Is <Guid>(g => g == employee.Id))).ReturnsAsync(employee);

            // act
            var result = await _handler.Handle(request, new CancellationToken());

            //assert
            Assert.Equal(2, result.Employee.Dependents.Count());
            Assert.Equal(expectedDeductionTotal, result.DeductionDetail.AnnualDeductions);
            Assert.Equal(expectedDeductionForPeriod, result.DeductionDetail.PeriodDeductions);
        }