aboutsummaryrefslogtreecommitdiffstats
path: root/src/testcases
diff options
context:
space:
mode:
authorNick Burch <nick@apache.org>2015-07-19 22:35:37 +0000
committerNick Burch <nick@apache.org>2015-07-19 22:35:37 +0000
commitca1dfbd1e5085ae9ea668b19372a273de1529f01 (patch)
tree166e1b78b6c26a2d1e52883960baf1d748512896 /src/testcases
parent01779c5721007ae44d2fed899626bfac6b7b551e (diff)
downloadpoi-ca1dfbd1e5085ae9ea668b19372a273de1529f01.tar.gz
poi-ca1dfbd1e5085ae9ea668b19372a273de1529f01.zip
#58130 Enable CF ColorScale support on the rule, and begin testing
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1691860 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases')
-rw-r--r--src/testcases/org/apache/poi/ss/usermodel/BaseTestConditionalFormatting.java21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/testcases/org/apache/poi/ss/usermodel/BaseTestConditionalFormatting.java b/src/testcases/org/apache/poi/ss/usermodel/BaseTestConditionalFormatting.java
index 1a130b7510..0d4c9d0520 100644
--- a/src/testcases/org/apache/poi/ss/usermodel/BaseTestConditionalFormatting.java
+++ b/src/testcases/org/apache/poi/ss/usermodel/BaseTestConditionalFormatting.java
@@ -773,6 +773,7 @@ public abstract class BaseTestConditionalFormatting extends TestCase {
// Mixed icons - Column U
// TODO Support EXT formattings
}
+
private void assertIconSetPercentages(ConditionalFormatting cf, IconSet iconset, Double...vals) {
assertEquals(1, cf.getNumberOfRules());
ConditionalFormattingRule cr = cf.getRule(0);
@@ -812,8 +813,9 @@ public abstract class BaseTestConditionalFormatting extends TestCase {
assertEquals(null, cr.getFormula1());
assertEquals(null, cr.getFormula2());
- // TODO Implement
-/*
+// TODO Finish HSSF
+if (cr instanceof HSSFConditionalFormattingRule) return;
+
ColorScaleFormatting color = cr.getColorScaleFormatting();
assertNotNull(color);
assertNotNull(color.getColors());
@@ -831,18 +833,16 @@ public abstract class BaseTestConditionalFormatting extends TestCase {
} else if (i == colors.length-1) {
assertEquals(RangeType.MAX, th.getRangeType());
} else {
- assertEquals(RangeType.PERCENT, th.getRangeType());
- assertEquals(steps*i, th.getValue());
+ assertEquals(RangeType.PERCENTILE, th.getRangeType());
+ assertEquals(steps*i, th.getValue().intValue());
}
assertEquals(null, th.getFormula());
}
// Colors should match
for (int i=0; i<colors.length; i++) {
- Color c = color.getColors()[i];
- assertEquals(colors[i], c.toString());
+ assertColour(colors[i], color.getColors()[i]);
}
-*/
}
public void testCreateFontFormatting() {
@@ -1068,6 +1068,13 @@ public abstract class BaseTestConditionalFormatting extends TestCase {
assertEquals(null, iconFmt.getThresholds()[3].getValue());
}
+ public void testCreateColorScaleFormatting() {
+ // TODO Implement then test
+ }
+ public void testCreateDataBarFormatting() {
+ // TODO Implement then test
+ }
+
public void testBug55380() {
Workbook wb = _testDataProvider.createWorkbook();
Sheet sheet = wb.createSheet();