diff options
author | Nick Burch <nick@apache.org> | 2015-07-14 21:45:23 +0000 |
---|---|---|
committer | Nick Burch <nick@apache.org> | 2015-07-14 21:45:23 +0000 |
commit | 1596a62368ca2a84e6f33853232e9fd1d598e13b (patch) | |
tree | f3cd17de92675adfc0863e9b16e3f1b41ecfcb49 /src/testcases/org/apache/poi/hssf/usermodel | |
parent | b2d6118eeb179296655e872e1ec0ccfdbe7d48d3 (diff) | |
download | poi-1596a62368ca2a84e6f33853232e9fd1d598e13b.tar.gz poi-1596a62368ca2a84e6f33853232e9fd1d598e13b.zip |
Start checking the CF colours in the unit tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1691092 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases/org/apache/poi/hssf/usermodel')
-rw-r--r-- | src/testcases/org/apache/poi/hssf/usermodel/TestHSSFConditionalFormatting.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFConditionalFormatting.java b/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFConditionalFormatting.java index 69c61a701a..697f350c7e 100644 --- a/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFConditionalFormatting.java +++ b/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFConditionalFormatting.java @@ -22,7 +22,9 @@ import java.io.FileNotFoundException; import java.io.IOException; import org.apache.poi.hssf.HSSFITestDataProvider; +import org.apache.poi.hssf.util.HSSFColor; import org.apache.poi.ss.usermodel.BaseTestConditionalFormatting; +import org.apache.poi.ss.usermodel.Color; import org.apache.poi.ss.usermodel.Sheet; import org.apache.poi.ss.usermodel.SheetConditionalFormatting; import org.apache.poi.ss.usermodel.Workbook; @@ -34,6 +36,11 @@ public final class TestHSSFConditionalFormatting extends BaseTestConditionalForm public TestHSSFConditionalFormatting(){ super(HSSFITestDataProvider.instance); } + protected void assertColour(String hexExpected, Color actual) { + assertNotNull("Colour must be given", actual); + HSSFColor colour = (HSSFColor)actual; + assertEquals(hexExpected, colour.getHexString()); + } public void testRead() { testRead("WithConditionalFormatting.xls"); |