aboutsummaryrefslogtreecommitdiffstats
path: root/src/testcases/org/apache/poi/ss
diff options
context:
space:
mode:
authorNick Burch <nick@apache.org>2015-07-13 17:54:28 +0000
committerNick Burch <nick@apache.org>2015-07-13 17:54:28 +0000
commit33562b30da7b6a264bd38f094190b8237e292066 (patch)
treefda741dd23b65aae27c6b76a4ac5e8de0571c88b /src/testcases/org/apache/poi/ss
parentd3f4225d1acfad000b72ee9539097d7ef43c54e1 (diff)
downloadpoi-33562b30da7b6a264bd38f094190b8237e292066.tar.gz
poi-33562b30da7b6a264bd38f094190b8237e292066.zip
CFRule12 tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1690778 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases/org/apache/poi/ss')
-rw-r--r--src/testcases/org/apache/poi/ss/usermodel/BaseTestConditionalFormatting.java28
1 files changed, 26 insertions, 2 deletions
diff --git a/src/testcases/org/apache/poi/ss/usermodel/BaseTestConditionalFormatting.java b/src/testcases/org/apache/poi/ss/usermodel/BaseTestConditionalFormatting.java
index b6e6ca932e..1fb7ada606 100644
--- a/src/testcases/org/apache/poi/ss/usermodel/BaseTestConditionalFormatting.java
+++ b/src/testcases/org/apache/poi/ss/usermodel/BaseTestConditionalFormatting.java
@@ -24,8 +24,7 @@ import org.apache.poi.ss.ITestDataProvider;
import org.apache.poi.ss.util.CellRangeAddress;
/**
- * @author Dmitriy Kumshayev
- * @author Yegor Kozlov
+ * Base tests for Conditional Formatting, for both HSSF and XSSF
*/
public abstract class BaseTestConditionalFormatting extends TestCase {
private final ITestDataProvider _testDataProvider;
@@ -525,6 +524,31 @@ public abstract class BaseTestConditionalFormatting extends TestCase {
assertEquals("\"AAA\"", rule5.getFormula2());
}
+ public void testReadOffice2007(String filename) {
+ Workbook wb = _testDataProvider.openSampleWorkbook(filename);
+ Sheet s = wb.getSheet("CF");
+ ConditionalFormatting cf = null;
+
+ // Sanity check data
+ assertEquals("Values", s.getRow(0).getCell(0).toString());
+ assertEquals("10.0", s.getRow(2).getCell(0).toString());
+
+ // Check we found all the conditional formattings rules we should have
+ SheetConditionalFormatting sheetCF = s.getSheetConditionalFormatting();
+ assertEquals(1, sheetCF.getNumConditionalFormattings()); // TODO Should be more!
+
+ cf = sheetCF.getConditionalFormattingAt(0);
+ //System.out.println(cf);
+
+
+ // Check the rules / values in detail
+
+ // Highlight Positive values - Column C
+ // TODO
+
+ // Highlight 10-30 - Column D
+ // TODO
+ }
public void testCreateFontFormatting() {
Workbook workbook = _testDataProvider.createWorkbook();