diff options
author | Dominik Stadler <centic@apache.org> | 2015-08-18 20:24:07 +0000 |
---|---|---|
committer | Dominik Stadler <centic@apache.org> | 2015-08-18 20:24:07 +0000 |
commit | c275ebb44c3973880449e606e8df57352a34a116 (patch) | |
tree | 29aa451aa8edda3ab572be6054818983fcbebf95 /src/testcases/org/apache/poi/ss | |
parent | 948b4d3be17e7ed6831d00a02d5f10109bb7f46a (diff) | |
download | poi-c275ebb44c3973880449e606e8df57352a34a116.tar.gz poi-c275ebb44c3973880449e606e8df57352a34a116.zip |
Add one unit-test for a different way of calculating workdays to see if this also triggers test failures in Sonar Maven runs which currently fail for test-case TestWorkdayFunction
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1696498 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases/org/apache/poi/ss')
-rw-r--r-- | src/testcases/org/apache/poi/ss/formula/atp/TestWorkdayCalculator.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/testcases/org/apache/poi/ss/formula/atp/TestWorkdayCalculator.java b/src/testcases/org/apache/poi/ss/formula/atp/TestWorkdayCalculator.java index 18d2a6262f..3ab1255a02 100644 --- a/src/testcases/org/apache/poi/ss/formula/atp/TestWorkdayCalculator.java +++ b/src/testcases/org/apache/poi/ss/formula/atp/TestWorkdayCalculator.java @@ -65,6 +65,12 @@ public class TestWorkdayCalculator extends TestCase { assertEquals(4, WorkdayCalculator.instance.calculateWorkdays(A_FRIDAY, A_WEDNESDAY, new double[]{ A_SATURDAY, A_SUNDAY })); } + public void testCalculateWorkdaysNumberOfDays() { + double start = 41553.0; + int days = 1; + assertEquals(new Date(113, 9, 7), WorkdayCalculator.instance.calculateWorkdays(start, days, new double[0])); + } + public void testPastDaysOfWeekShouldReturn0Past0Saturdays() { final double A_WEDNESDAY = DateUtil.getExcelDate(new Date(111, DECEMBER, 7)); final double A_FRIDAY = DateUtil.getExcelDate(new Date(111, DECEMBER, 9)); |