aboutsummaryrefslogtreecommitdiffstats
path: root/src/testcases/org/apache/poi/ss/formula
diff options
context:
space:
mode:
authorJaven O'Neal <onealj@apache.org>2016-07-07 23:00:07 +0000
committerJaven O'Neal <onealj@apache.org>2016-07-07 23:00:07 +0000
commit417868e70cef5bc65abaf8887b5bc4f3653c4e92 (patch)
tree24a81fa6941bfaa0792283e727af0089744312fc /src/testcases/org/apache/poi/ss/formula
parentda9e9bad185b877a220e6339e5511208f8233aa0 (diff)
downloadpoi-417868e70cef5bc65abaf8887b5bc4f3653c4e92.tar.gz
poi-417868e70cef5bc65abaf8887b5bc4f3653c4e92.zip
add crude line-coverage tests for setDebugEvaluationOutputForNextEval and setIgnoreMissingWorkbooks
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1751841 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases/org/apache/poi/ss/formula')
-rw-r--r--src/testcases/org/apache/poi/ss/formula/TestWorkbookEvaluator.java28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/testcases/org/apache/poi/ss/formula/TestWorkbookEvaluator.java b/src/testcases/org/apache/poi/ss/formula/TestWorkbookEvaluator.java
index e9f2dc5c39..c97face949 100644
--- a/src/testcases/org/apache/poi/ss/formula/TestWorkbookEvaluator.java
+++ b/src/testcases/org/apache/poi/ss/formula/TestWorkbookEvaluator.java
@@ -18,7 +18,9 @@
package org.apache.poi.ss.formula;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.io.IOException;
@@ -302,6 +304,32 @@ public class TestWorkbookEvaluator {
wb.close();
}
+
+ @Test
+ public void testIgnoreMissingWorkbooks() {
+ // TODO: update this test for meaningful functional behavior
+ WorkbookEvaluator evaluator = new WorkbookEvaluator(null, null, null);
+ assertFalse(evaluator.isIgnoreMissingWorkbooks());
+
+ evaluator.setIgnoreMissingWorkbooks(true);
+ assertTrue(evaluator.isIgnoreMissingWorkbooks());
+
+ evaluator.setIgnoreMissingWorkbooks(false);
+ assertFalse(evaluator.isIgnoreMissingWorkbooks());
+ }
+
+ @Test
+ public void testDebugEvaluationOutputForNextEval() {
+ // TODO: update this test for meaningful functional behavior
+ WorkbookEvaluator evaluator = new WorkbookEvaluator(null, null, null);
+ assertFalse(evaluator.isDebugEvaluationOutputForNextEval());
+
+ evaluator.setDebugEvaluationOutputForNextEval(true);
+ assertTrue(evaluator.isDebugEvaluationOutputForNextEval());
+
+ evaluator.setDebugEvaluationOutputForNextEval(false);
+ assertFalse(evaluator.isDebugEvaluationOutputForNextEval());
+ }
// Test IF-Equals Formula Evaluation (bug 58591)