Created
October 2, 2013 14:47
-
-
Save michal-lipski/6794945 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void employee_on_full_month_sick_leave_gets_special_salary_type() throws Exception { | |
Calendar start = Calendar.getInstance(); | |
start.set(Calendar.YEAR, 2011); | |
start.set(Calendar.MONTH, DECEMBER - 1); // Januar = 0 | |
start.set(Calendar.DAY_OF_MONTH, 1); | |
Calendar end = Calendar.getInstance(); | |
start.set(Calendar.YEAR, 2011); | |
start.set(Calendar.MONTH, DECEMBER - 1); // Januar = 0 | |
start.set(Calendar.DAY_OF_MONTH, 31); | |
this.employee.setSickFrom(start).to(end); | |
Salary salary = this.calculator.salaryFor(employee, DECEMBER); | |
assertNotNull(salary); | |
SalaryType salaryType = salary.getType(); | |
assertNotNull(salaryType); | |
assertEquals(SalaryType.SICK, salaryType.getName()); | |
} | |
@Test | |
public void employee_on_full_month_sick_leave_gets_special_salary_type() throws Exception { | |
employee.setSickFrom(date(2011, DECEMBER, 1)).to(date(2011, DECEMBER, 31)); | |
SalaryType salaryType = calculator.salaryFor(employee, DECEMBER); | |
assertThat(salaryType).isEqualTo(SalaryType.SICK); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment