From 417868e70cef5bc65abaf8887b5bc4f3653c4e92 Mon Sep 17 00:00:00 2001 From: Javen O'Neal Date: Thu, 7 Jul 2016 23:00:07 +0000 Subject: 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 --- .../poi/ss/formula/TestWorkbookEvaluator.java | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'src/testcases/org/apache/poi/ss/formula') 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) -- cgit v1.2.3