diff options
author | Nick Burch <nick@apache.org> | 2008-04-03 00:23:59 +0000 |
---|---|---|
committer | Nick Burch <nick@apache.org> | 2008-04-03 00:23:59 +0000 |
commit | 21154b1bbfcbd21eccd8e7d2d3a11028b110789f (patch) | |
tree | b2619c87f144df183c56e8571f636a8ac9962823 /src/testcases/org/apache/poi/hssf/usermodel/TestHSSFComment.java | |
parent | c496f727c95e6b9928063e7b4b9a17cbae577764 (diff) | |
download | poi-21154b1bbfcbd21eccd8e7d2d3a11028b110789f.tar.gz poi-21154b1bbfcbd21eccd8e7d2d3a11028b110789f.zip |
New ooxml4j, and finish getting xssf comments to be saved and re-loaded again
git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@644118 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases/org/apache/poi/hssf/usermodel/TestHSSFComment.java')
-rw-r--r-- | src/testcases/org/apache/poi/hssf/usermodel/TestHSSFComment.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFComment.java b/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFComment.java index f1f1882732..6a977effb8 100644 --- a/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFComment.java +++ b/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFComment.java @@ -78,6 +78,26 @@ public class TestHSSFComment extends TestCase { assertEquals(commentText, comment.getString().getString()); assertEquals(cellRow, comment.getRow()); assertEquals(cellColumn, comment.getColumn()); + + + // Change slightly, and re-test + comment.setString(new HSSFRichTextString("New Comment Text")); + + out = new ByteArrayOutputStream(); + wb.write(out); + out.close(); + + wb = new HSSFWorkbook(new ByteArrayInputStream(out.toByteArray())); + sheet = wb.getSheetAt(0); + cell = sheet.getRow(cellRow).getCell(cellColumn); + comment = cell.getCellComment(); + + assertNotNull(comment); + assertEquals(HSSFSimpleShape.OBJECT_TYPE_COMMENT, comment.getShapeType()); + assertEquals(commentAuthor, comment.getAuthor()); + assertEquals("New Comment Text", comment.getString().getString()); + assertEquals(cellRow, comment.getRow()); + assertEquals(cellColumn, comment.getColumn()); } /** |