aboutsummaryrefslogtreecommitdiffstats
path: root/src/testcases
diff options
context:
space:
mode:
authorPJ Fanning <fanningpj@apache.org>2017-10-22 13:53:42 +0000
committerPJ Fanning <fanningpj@apache.org>2017-10-22 13:53:42 +0000
commit5ecf32781dd756df5303f9d88e563db73032a60e (patch)
tree3997ccbd22843063f703ceb5fd2d46b15c201385 /src/testcases
parente52d29df16a661545bd9a0acc14f5255baf57589 (diff)
downloadpoi-5ecf32781dd756df5303f9d88e563db73032a60e.tar.gz
poi-5ecf32781dd756df5303f9d88e563db73032a60e.zip
Introduce new BorderFormatting methods to expose border styles
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1812917 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases')
-rw-r--r--src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java4
-rw-r--r--src/testcases/org/apache/poi/ss/usermodel/BaseTestConditionalFormatting.java58
2 files changed, 31 insertions, 31 deletions
diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java b/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java
index b68c92bccb..52a6c1d22b 100644
--- a/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java
+++ b/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java
@@ -3057,7 +3057,7 @@ public final class TestBugs extends BaseTestBugzillaIssues {
HSSFBorderFormatting bord = rule.createBorderFormatting();
bord.setBorderDiagonal(BorderStyle.THICK);
- assertEquals(BorderStyle.THICK, bord.getBorderDiagonalEnum());
+ assertEquals(BorderStyle.THICK, bord.getBorderDiagonal());
bord.setBackwardDiagonalOn(true);
assertTrue(bord.isBackwardDiagonalOn());
@@ -3070,7 +3070,7 @@ public final class TestBugs extends BaseTestBugzillaIssues {
// Create the bottom border style so we know what a border is supposed to look like
bord.setBorderBottom(BorderStyle.THICK);
- assertEquals(BorderStyle.THICK, bord.getBorderBottomEnum());
+ assertEquals(BorderStyle.THICK, bord.getBorderBottom());
bord.setBottomBorderColor(BLUE);
assertEquals(BLUE, bord.getBottomBorderColor());
diff --git a/src/testcases/org/apache/poi/ss/usermodel/BaseTestConditionalFormatting.java b/src/testcases/org/apache/poi/ss/usermodel/BaseTestConditionalFormatting.java
index d1b4290100..bbcafbaebd 100644
--- a/src/testcases/org/apache/poi/ss/usermodel/BaseTestConditionalFormatting.java
+++ b/src/testcases/org/apache/poi/ss/usermodel/BaseTestConditionalFormatting.java
@@ -358,10 +358,10 @@ public abstract class BaseTestConditionalFormatting {
BorderFormatting r1bf = rule1.getBorderFormatting();
assertNotNull(r1bf);
- assertEquals(BorderStyle.THIN, r1bf.getBorderBottomEnum());
- assertEquals(BorderStyle.THICK,r1bf.getBorderTopEnum());
- assertEquals(BorderStyle.DASHED,r1bf.getBorderLeftEnum());
- assertEquals(BorderStyle.DOTTED,r1bf.getBorderRightEnum());
+ assertEquals(BorderStyle.THIN, r1bf.getBorderBottom());
+ assertEquals(BorderStyle.THICK,r1bf.getBorderTop());
+ assertEquals(BorderStyle.DASHED,r1bf.getBorderLeft());
+ assertEquals(BorderStyle.DOTTED,r1bf.getBorderRight());
PatternFormatting r1pf = rule1.getPatternFormatting();
assertNotNull(r1pf);
@@ -1013,19 +1013,19 @@ public abstract class BaseTestConditionalFormatting {
for (BorderStyle border : BorderStyle.values()) {
borderFmt.setBorderTop(border);
- assertEquals(border, borderFmt.getBorderTopEnum());
+ assertEquals(border, borderFmt.getBorderTop());
borderFmt.setBorderBottom(border);
- assertEquals(border, borderFmt.getBorderBottomEnum());
+ assertEquals(border, borderFmt.getBorderBottom());
borderFmt.setBorderLeft(border);
- assertEquals(border, borderFmt.getBorderLeftEnum());
+ assertEquals(border, borderFmt.getBorderLeft());
borderFmt.setBorderRight(border);
- assertEquals(border, borderFmt.getBorderRightEnum());
+ assertEquals(border, borderFmt.getBorderRight());
borderFmt.setBorderDiagonal(border);
- assertEquals(border, borderFmt.getBorderDiagonalEnum());
+ assertEquals(border, borderFmt.getBorderDiagonal());
}
workbook.close();
@@ -1041,37 +1041,37 @@ public abstract class BaseTestConditionalFormatting {
ConditionalFormattingRule rule1 = sheetCF.createConditionalFormattingRule(ComparisonOperator.EQUAL, "7");
BorderFormatting borderFmt = rule1.createBorderFormatting();
- assertEquals(BorderStyle.NONE, borderFmt.getBorderBottomEnum());
+ assertEquals(BorderStyle.NONE, borderFmt.getBorderBottom());
borderFmt.setBorderBottom(BorderStyle.DOTTED);
- assertEquals(BorderStyle.DOTTED, borderFmt.getBorderBottomEnum());
+ assertEquals(BorderStyle.DOTTED, borderFmt.getBorderBottom());
borderFmt.setBorderBottom(BorderStyle.NONE);
- assertEquals(BorderStyle.NONE, borderFmt.getBorderBottomEnum());
+ assertEquals(BorderStyle.NONE, borderFmt.getBorderBottom());
borderFmt.setBorderBottom(BorderStyle.THICK);
- assertEquals(BorderStyle.THICK, borderFmt.getBorderBottomEnum());
+ assertEquals(BorderStyle.THICK, borderFmt.getBorderBottom());
- assertEquals(BorderStyle.NONE, borderFmt.getBorderTopEnum());
+ assertEquals(BorderStyle.NONE, borderFmt.getBorderTop());
borderFmt.setBorderTop(BorderStyle.DOTTED);
- assertEquals(BorderStyle.DOTTED, borderFmt.getBorderTopEnum());
+ assertEquals(BorderStyle.DOTTED, borderFmt.getBorderTop());
borderFmt.setBorderTop(BorderStyle.NONE);
- assertEquals(BorderStyle.NONE, borderFmt.getBorderTopEnum());
+ assertEquals(BorderStyle.NONE, borderFmt.getBorderTop());
borderFmt.setBorderTop(BorderStyle.THICK);
- assertEquals(BorderStyle.THICK, borderFmt.getBorderTopEnum());
+ assertEquals(BorderStyle.THICK, borderFmt.getBorderTop());
- assertEquals(BorderStyle.NONE, borderFmt.getBorderLeftEnum());
+ assertEquals(BorderStyle.NONE, borderFmt.getBorderLeft());
borderFmt.setBorderLeft(BorderStyle.DOTTED);
- assertEquals(BorderStyle.DOTTED, borderFmt.getBorderLeftEnum());
+ assertEquals(BorderStyle.DOTTED, borderFmt.getBorderLeft());
borderFmt.setBorderLeft(BorderStyle.NONE);
- assertEquals(BorderStyle.NONE, borderFmt.getBorderLeftEnum());
+ assertEquals(BorderStyle.NONE, borderFmt.getBorderLeft());
borderFmt.setBorderLeft(BorderStyle.THIN);
- assertEquals(BorderStyle.THIN, borderFmt.getBorderLeftEnum());
+ assertEquals(BorderStyle.THIN, borderFmt.getBorderLeft());
- assertEquals(BorderStyle.NONE, borderFmt.getBorderRightEnum());
+ assertEquals(BorderStyle.NONE, borderFmt.getBorderRight());
borderFmt.setBorderRight(BorderStyle.DOTTED);
- assertEquals(BorderStyle.DOTTED, borderFmt.getBorderRightEnum());
+ assertEquals(BorderStyle.DOTTED, borderFmt.getBorderRight());
borderFmt.setBorderRight(BorderStyle.NONE);
- assertEquals(BorderStyle.NONE, borderFmt.getBorderRightEnum());
+ assertEquals(BorderStyle.NONE, borderFmt.getBorderRight());
borderFmt.setBorderRight(BorderStyle.HAIR);
- assertEquals(BorderStyle.HAIR, borderFmt.getBorderRightEnum());
+ assertEquals(BorderStyle.HAIR, borderFmt.getBorderRight());
ConditionalFormattingRule [] cfRules = { rule1 };
@@ -1087,10 +1087,10 @@ public abstract class BaseTestConditionalFormatting {
BorderFormatting r1fp = cf.getRule(0).getBorderFormatting();
assertNotNull(r1fp);
- assertEquals(BorderStyle.THICK, r1fp.getBorderBottomEnum());
- assertEquals(BorderStyle.THICK, r1fp.getBorderTopEnum());
- assertEquals(BorderStyle.THIN, r1fp.getBorderLeftEnum());
- assertEquals(BorderStyle.HAIR, r1fp.getBorderRightEnum());
+ assertEquals(BorderStyle.THICK, r1fp.getBorderBottom());
+ assertEquals(BorderStyle.THICK, r1fp.getBorderTop());
+ assertEquals(BorderStyle.THIN, r1fp.getBorderLeft());
+ assertEquals(BorderStyle.HAIR, r1fp.getBorderRight());
workbook.close();
}