From 1596a62368ca2a84e6f33853232e9fd1d598e13b Mon Sep 17 00:00:00 2001 From: Nick Burch Date: Tue, 14 Jul 2015 21:45:23 +0000 Subject: 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 --- .../apache/poi/hssf/usermodel/TestHSSFConditionalFormatting.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/testcases/org/apache/poi/hssf/usermodel') 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"); -- cgit v1.2.3