]> source.dussan.org Git - poi.git/commitdiff
Fix a unit test that changed with the implementation of another function.
authorGreg Woolsey <gwoolsey@apache.org>
Mon, 18 Mar 2019 22:05:34 +0000 (22:05 +0000)
committerGreg Woolsey <gwoolsey@apache.org>
Mon, 18 Mar 2019 22:05:34 +0000 (22:05 +0000)
Didn't fail for me because I hadn't noticed the Eclipse classpath was out of date wrt some dependency versions, and therefore my local code was not compiling properly, meaning my test run ran old code and passed this one when it should have failed.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1855792 13f79535-47bb-0310-9956-ffa450edef68

.classpath
src/ooxml/testcases/org/apache/poi/ss/usermodel/ConditionalFormattingEvalTest.java

index 247c5000e23871259ff439a79eb94013a5729b25..f17074e3e5e04eec97232a50396d65c0d6a8fe7b 100644 (file)
        <classpathentry exported="true" kind="lib" path="lib/commons-collections4-4.2.jar"/>
        <classpathentry kind="lib" path="lib/commons-math3-3.6.1.jar"/>
        <classpathentry kind="lib" path="lib/xmlunit-core-2.5.1.jar"/>
-       <classpathentry kind="lib" path="lib/mockito-core-2.21.0.jar"/>
-       <classpathentry kind="lib" path="lib/byte-buddy-1.7.9.jar"/>
-       <classpathentry kind="lib" path="lib/byte-buddy-agent-1.7.9.jar"/>
        <classpathentry kind="lib" path="lib/objenesis-2.6.jar"/>
        <classpathentry kind="lib" path="lib/commons-compress-1.18.jar"/>
+       <classpathentry kind="lib" path="lib/mockito-core-2.23.4.jar"/>
+       <classpathentry kind="lib" path="lib/byte-buddy-1.9.3.jar"/>
+       <classpathentry kind="lib" path="lib/byte-buddy-agent-1.9.3.jar"/>
        <classpathentry kind="output" path="bin"/>
 </classpath>
index 9d8363521526503bf6470d67b92ce6ae305e00e3..c889eb847155aa25e3c27a29fbbfb2178e128e23 100644 (file)
@@ -161,19 +161,9 @@ public class ConditionalFormattingEvalTest {
         cfe = new ConditionalFormattingEvaluator(wb, formulaEval);
 
         sheet = wb.getSheetAt(0);
-        try {
-            getRulesFor(2, 1);
-            fail("Got rules when an unsupported function error was expected.");
-        } catch (NotImplementedException e) {
-            // expected
-        }
+        assertEquals("no rules should apply", 0, getRulesFor(2, 1).size());
 
-        try {
-            getRulesFor(2, 1);
-            fail("Got rules the second time when an unsupported function error was expected.");
-        } catch (NotImplementedException e) {
-            // expected
-        }
+        assertEquals("no rules should apply", 0, getRulesFor(2, 1).size());
         
     }