public void ComputeTakeHomeForIreland_Throws_Exception_When_Either_HourlyRate_Or_HoursWorked_IsZero(int hoursWorked, double hourlyRate, string location) { //arrange var taxStrategy = new IrelandTakeHomeCalculatorStrategy(_grossPayService); var employeeData = new EmployeeData() { HourlyRate = hourlyRate, HoursWorked = hoursWorked, Location = location }; //act //assert Assert.That(() => taxStrategy.GeneratePayCheck(employeeData), Throws.TypeOf <Exception>()); }
public void ComputeTakeHomeForIreland(int hoursWorked, double hourlyRate, string location, double netAmount) { //arrange var taxStrategy = new IrelandTakeHomeCalculatorStrategy(_grossPayService); var employeeData = new EmployeeData() { HourlyRate = hourlyRate, HoursWorked = hoursWorked, Location = location }; //act var payCheck = taxStrategy.GeneratePayCheck(employeeData); //assert Assert.That(payCheck.NetAmount, Is.EqualTo(netAmount)); }