diff options
author | Nick Burch <nick@apache.org> | 2015-07-14 21:54:28 +0000 |
---|---|---|
committer | Nick Burch <nick@apache.org> | 2015-07-14 21:54:28 +0000 |
commit | bd45a3b915544e8bfd6253415d436ba81edcb520 (patch) | |
tree | 029c794923348915e5ced1dc61bf5837eacebf0b /src/testcases/org/apache/poi/ss/usermodel | |
parent | 1596a62368ca2a84e6f33853232e9fd1d598e13b (diff) | |
download | poi-bd45a3b915544e8bfd6253415d436ba81edcb520.tar.gz poi-bd45a3b915544e8bfd6253415d436ba81edcb520.zip |
More CF colour tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1691094 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases/org/apache/poi/ss/usermodel')
-rw-r--r-- | src/testcases/org/apache/poi/ss/usermodel/BaseTestConditionalFormatting.java | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/src/testcases/org/apache/poi/ss/usermodel/BaseTestConditionalFormatting.java b/src/testcases/org/apache/poi/ss/usermodel/BaseTestConditionalFormatting.java index 5ee58d4b48..a803fc83cd 100644 --- a/src/testcases/org/apache/poi/ss/usermodel/BaseTestConditionalFormatting.java +++ b/src/testcases/org/apache/poi/ss/usermodel/BaseTestConditionalFormatting.java @@ -594,10 +594,15 @@ public abstract class BaseTestConditionalFormatting extends TestCase { 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 BaseTestConditionalFormatting extends TestCase { 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
|