You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ni...@apache.org on 2015/07/14 23:54:29 UTC

svn commit: r1691094 - /poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestConditionalFormatting.java

Author: nick
Date: Tue Jul 14 21:54:28 2015
New Revision: 1691094

URL: http://svn.apache.org/r1691094
Log:
More CF colour tests

Modified:
    poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestConditionalFormatting.java

Modified: poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestConditionalFormatting.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestConditionalFormatting.java?rev=1691094&r1=1691093&r2=1691094&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestConditionalFormatting.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestConditionalFormatting.java Tue Jul 14 21:54:28 2015
@@ -594,10 +594,15 @@ public abstract class BaseTestConditiona
         assertEquals(ComparisonOperator.GT, cr.getComparisonOperation());
         assertEquals("0", cr.getFormula1());
         assertEquals(null, cr.getFormula2());
-        // TODO Should the colours be slightly different like this?
+        // When it matches:
+        //   Sets the font colour to dark green
+        //   Sets the background colour to lighter green
+        // TODO Should the colours be slightly different between formats?
         if (cr instanceof HSSFConditionalFormattingRule) {
+            assertColour("0:8080:0", cr.getFontFormatting().getFontColor());
             assertColour("CCCC:FFFF:CCCC", cr.getPatternFormatting().getFillBackgroundColorColor());
         } else {
+            assertColour("006100", cr.getFontFormatting().getFontColor());
             assertColour("C6EFCE", cr.getPatternFormatting().getFillBackgroundColorColor());
         }
         
@@ -613,9 +618,17 @@ public abstract class BaseTestConditiona
         assertEquals(ComparisonOperator.BETWEEN, cr.getComparisonOperation());
         assertEquals("10", cr.getFormula1());
         assertEquals("30", cr.getFormula2());
-//        assertColourGreen(cr);
-//        assertColourRed(cr);
-        // TODO Colour checking
+        // When it matches:
+        //   Sets the font colour to dark red
+        //   Sets the background colour to lighter red
+        // TODO Should the colours be slightly different between formats?
+        if (cr instanceof HSSFConditionalFormattingRule) {
+            assertColour("8080:0:8080", cr.getFontFormatting().getFontColor());
+            assertColour("FFFF:9999:CCCC", cr.getPatternFormatting().getFillBackgroundColorColor());
+        } else {
+            assertColour("9C0006", cr.getFontFormatting().getFontColor());
+            assertColour("FFC7CE", cr.getPatternFormatting().getFillBackgroundColorColor());
+        }
 
         
         // Data Bars - Column E



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org