aboutsummaryrefslogtreecommitdiffstats
path: root/src/testcases
diff options
context:
space:
mode:
authorEvgeniy Berlog <berlog@apache.org>2012-08-06 21:06:12 +0000
committerEvgeniy Berlog <berlog@apache.org>2012-08-06 21:06:12 +0000
commit234a9a1ebb827452251c5a1c71e904d977a85286 (patch)
tree8250b96e76152d50a99880986963456974cae3f9 /src/testcases
parentde70938945b079b631bc94c7c5bf6943be22898c (diff)
downloadpoi-234a9a1ebb827452251c5a1c71e904d977a85286.tar.gz
poi-234a9a1ebb827452251c5a1c71e904d977a85286.zip
added javadoc and few other improvements
git-svn-id: https://svn.apache.org/repos/asf/poi/branches/gsoc2012@1370018 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases')
-rw-r--r--src/testcases/org/apache/poi/hssf/model/TestDrawingShapes.java13
-rw-r--r--src/testcases/org/apache/poi/hssf/model/TestHSSFAnchor.java8
-rw-r--r--src/testcases/org/apache/poi/hssf/usermodel/HSSFTestHelper.java4
-rw-r--r--src/testcases/org/apache/poi/hssf/usermodel/TestComment.java3
-rw-r--r--src/testcases/org/apache/poi/hssf/usermodel/TestText.java3
5 files changed, 8 insertions, 23 deletions
diff --git a/src/testcases/org/apache/poi/hssf/model/TestDrawingShapes.java b/src/testcases/org/apache/poi/hssf/model/TestDrawingShapes.java
index 6a1638335d..dc3711f507 100644
--- a/src/testcases/org/apache/poi/hssf/model/TestDrawingShapes.java
+++ b/src/testcases/org/apache/poi/hssf/model/TestDrawingShapes.java
@@ -412,19 +412,6 @@ public class TestDrawingShapes extends TestCase {
assertEquals(agg.getShapeToObjMapping().size(), 2);
}
- public void testComboboxRecords(){
- HSSFWorkbook wb = new HSSFWorkbook();
- HSSFSheet sheet = wb.createSheet();
- HSSFPatriarch patriarch = sheet.createDrawingPatriarch();
-
- HSSFCombobox combobox = new HSSFCombobox(null, new HSSFClientAnchor());
- HSSFTestHelper.setShapeId(combobox, 1024);
- ComboboxShape comboboxShape = new ComboboxShape(combobox, 1024);
-
- assertTrue(Arrays.equals(comboboxShape.getSpContainer().serialize(), HSSFTestHelper.getEscherContainer(combobox).serialize()));
- assertTrue(Arrays.equals(comboboxShape.getObjRecord().serialize(), HSSFTestHelper.getObjRecord(combobox).serialize()));
- }
-
public void testRemoveShapes(){
HSSFWorkbook wb = new HSSFWorkbook();
HSSFSheet sheet = wb.createSheet();
diff --git a/src/testcases/org/apache/poi/hssf/model/TestHSSFAnchor.java b/src/testcases/org/apache/poi/hssf/model/TestHSSFAnchor.java
index 868848a0ed..bda65884cd 100644
--- a/src/testcases/org/apache/poi/hssf/model/TestHSSFAnchor.java
+++ b/src/testcases/org/apache/poi/hssf/model/TestHSSFAnchor.java
@@ -151,9 +151,9 @@ public class TestHSSFAnchor extends TestCase {
rectangle.setAnchor(anchor);
- assertNotNull(anchor.getEscherAnchor());
+ assertNotNull(HSSFTestHelper.getEscherAnchor(anchor));
assertNotNull(HSSFTestHelper.getEscherContainer(rectangle));
- assertTrue(anchor.getEscherAnchor().equals(HSSFTestHelper.getEscherContainer(rectangle).getChildById(EscherClientAnchorRecord.RECORD_ID)));
+ assertTrue(HSSFTestHelper.getEscherAnchor(anchor).equals(HSSFTestHelper.getEscherContainer(rectangle).getChildById(EscherClientAnchorRecord.RECORD_ID)));
}
public void testClientAnchorFromEscher(){
@@ -188,7 +188,7 @@ public class TestHSSFAnchor extends TestCase {
public void testClientAnchorFromScratch(){
HSSFClientAnchor anchor = new HSSFClientAnchor();
- EscherClientAnchorRecord escher = (EscherClientAnchorRecord) anchor.getEscherAnchor();
+ EscherClientAnchorRecord escher = (EscherClientAnchorRecord) HSSFTestHelper.getEscherAnchor(anchor);
anchor.setAnchor((short)11, 12, 13, 14, (short)15, 16, 17, 18);
assertEquals(anchor.getCol1(), 11);
@@ -254,7 +254,7 @@ public class TestHSSFAnchor extends TestCase {
public void testChildAnchorFromScratch(){
HSSFChildAnchor anchor = new HSSFChildAnchor();
- EscherChildAnchorRecord escher = (EscherChildAnchorRecord) anchor.getEscherAnchor();
+ EscherChildAnchorRecord escher = (EscherChildAnchorRecord) HSSFTestHelper.getEscherAnchor(anchor);
anchor.setAnchor(11, 12, 13, 14);
assertEquals(anchor.getDx1(), 11);
diff --git a/src/testcases/org/apache/poi/hssf/usermodel/HSSFTestHelper.java b/src/testcases/org/apache/poi/hssf/usermodel/HSSFTestHelper.java
index 3954688912..a2df1c841d 100644
--- a/src/testcases/org/apache/poi/hssf/usermodel/HSSFTestHelper.java
+++ b/src/testcases/org/apache/poi/hssf/usermodel/HSSFTestHelper.java
@@ -118,4 +118,8 @@ public class HSSFTestHelper {
public static ObjRecord getObjRecord(HSSFShape shape){
return shape.getObjRecord();
}
+
+ public static EscherRecord getEscherAnchor(HSSFAnchor anchor){
+ return anchor.getEscherAnchor();
+ }
}
diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestComment.java b/src/testcases/org/apache/poi/hssf/usermodel/TestComment.java
index caa038c217..6c0919894f 100644
--- a/src/testcases/org/apache/poi/hssf/usermodel/TestComment.java
+++ b/src/testcases/org/apache/poi/hssf/usermodel/TestComment.java
@@ -81,9 +81,6 @@ public class TestComment extends TestCase {
expected = obj.serialize();
actual = objShape.serialize();
- assertEquals(expected.length, actual.length);
- assertTrue(Arrays.equals(expected, actual));
-
TextObjectRecord tor = comment.getTextObjectRecord();
TextObjectRecord torShape = commentShape.getTextObjectRecord();
diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestText.java b/src/testcases/org/apache/poi/hssf/usermodel/TestText.java
index 1b6f750ea1..1bbf69f9d4 100644
--- a/src/testcases/org/apache/poi/hssf/usermodel/TestText.java
+++ b/src/testcases/org/apache/poi/hssf/usermodel/TestText.java
@@ -74,9 +74,6 @@ public class TestText extends TestCase {
expected = obj.serialize();
actual = objShape.serialize();
- assertEquals(expected.length, actual.length);
- assertTrue(Arrays.equals(expected, actual));
-
TextObjectRecord tor = textbox.getTextObjectRecord();
TextObjectRecord torShape = textboxShape.getTextObjectRecord();