mirror of https://github.com/apache/poi.git
[bug-65879] add tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1897955 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7d7a088f47
commit
4fda4a0455
|
@ -87,9 +87,17 @@ class TestWorkdayCalculator {
|
|||
|
||||
@Test
|
||||
void testCalculateWorkdaysNumberOfDays() {
|
||||
double start = 41553.0;
|
||||
double start = DateUtil.getExcelDate(d(2013, 10, 4));
|
||||
assertEquals(41551.0, start);
|
||||
int days = 1;
|
||||
assertEquals(d(2013, 10, 7), WorkdayCalculator.instance.calculateWorkdays(start, days, new double[0]));
|
||||
assertEquals(d(2013, 10, 7), WorkdayCalculator.instance.calculateWorkdays(start + 1, days, new double[0]));
|
||||
assertEquals(d(2013, 10, 7), WorkdayCalculator.instance.calculateWorkdays(start + 2, days, new double[0]));
|
||||
assertEquals(d(2013, 10, 5),
|
||||
WorkdayCalculator.instance.calculateWorkdays(start, days, 5, new double[0]));
|
||||
|
||||
assertEquals(d(2013, 10, 3), WorkdayCalculator.instance.calculateWorkdays(start, -1, new double[0]));
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in New Issue