aboutsummaryrefslogtreecommitdiffstats
path: root/src/testcases/org/apache/poi/hssf/model/TestHSSFAnchor.java
diff options
context:
space:
mode:
authorEvgeniy Berlog <berlog@apache.org>2012-07-11 12:08:38 +0000
committerEvgeniy Berlog <berlog@apache.org>2012-07-11 12:08:38 +0000
commit8b027ef5cdef15ace8ba6585458a32209d9e6928 (patch)
treefe101f8beeb33413592b7557bce20fcfa7a01c0e /src/testcases/org/apache/poi/hssf/model/TestHSSFAnchor.java
parent06df547a594c30a10d9d25eb82fcd107c2f42ae4 (diff)
downloadpoi-8b027ef5cdef15ace8ba6585458a32209d9e6928.tar.gz
poi-8b027ef5cdef15ace8ba6585458a32209d9e6928.zip
checked all examples, added several features
git-svn-id: https://svn.apache.org/repos/asf/poi/branches/gsoc2012@1360132 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases/org/apache/poi/hssf/model/TestHSSFAnchor.java')
-rw-r--r--src/testcases/org/apache/poi/hssf/model/TestHSSFAnchor.java34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/testcases/org/apache/poi/hssf/model/TestHSSFAnchor.java b/src/testcases/org/apache/poi/hssf/model/TestHSSFAnchor.java
index 248247266a..9134332834 100644
--- a/src/testcases/org/apache/poi/hssf/model/TestHSSFAnchor.java
+++ b/src/testcases/org/apache/poi/hssf/model/TestHSSFAnchor.java
@@ -375,4 +375,38 @@ public class TestHSSFAnchor extends TestCase {
childAnchor2.setDy2(3);
assertEquals(childAnchor1, childAnchor2);
}
+
+ public void testFlipped(){
+ HSSFChildAnchor child = new HSSFChildAnchor(2,2,1,1);
+ assertEquals(child.isHorizontallyFlipped(), true);
+ assertEquals(child.isVerticallyFlipped(), true);
+ assertEquals(child.getDx1(), 1);
+ assertEquals(child.getDx2(), 2);
+ assertEquals(child.getDy1(), 1);
+ assertEquals(child.getDy2(), 2);
+
+ child = new HSSFChildAnchor(3,3,4,4);
+ assertEquals(child.isHorizontallyFlipped(), false);
+ assertEquals(child.isVerticallyFlipped(), false);
+ assertEquals(child.getDx1(), 3);
+ assertEquals(child.getDx2(), 4);
+ assertEquals(child.getDy1(), 3);
+ assertEquals(child.getDy2(), 4);
+
+ HSSFClientAnchor client = new HSSFClientAnchor(1,1,1,1, (short)4,4,(short)3,3);
+ assertEquals(client.isVerticallyFlipped(), true);
+ assertEquals(client.isHorizontallyFlipped(), true);
+ assertEquals(client.getCol1(), 3);
+ assertEquals(client.getCol2(), 4);
+ assertEquals(client.getRow1(), 3);
+ assertEquals(client.getRow2(), 4);
+
+ client = new HSSFClientAnchor(1,1,1,1, (short)5,5,(short)6,6);
+ assertEquals(client.isVerticallyFlipped(), false);
+ assertEquals(client.isHorizontallyFlipped(), false);
+ assertEquals(client.getCol1(), 5);
+ assertEquals(client.getCol2(), 6);
+ assertEquals(client.getRow1(), 5);
+ assertEquals(client.getRow2(), 6);
+ }
}