aboutsummaryrefslogtreecommitdiffstats
path: root/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFComment.java
diff options
context:
space:
mode:
authorNick Burch <nick@apache.org>2008-04-07 12:51:50 +0000
committerNick Burch <nick@apache.org>2008-04-07 12:51:50 +0000
commitcbecd918ab99c788d6208e75736b39c066b39cc0 (patch)
treebc09f0da599d2fb98a19fd5706c9c66939c24b25 /src/testcases/org/apache/poi/hssf/usermodel/TestHSSFComment.java
parent559508b7e0e1a9eb30fe129ed094b9771f1f9f68 (diff)
downloadpoi-cbecd918ab99c788d6208e75736b39c066b39cc0.tar.gz
poi-cbecd918ab99c788d6208e75736b39c066b39cc0.zip
Merged revisions 638786-638802,638805-638811,638813-638814,638816-639230,639233-639241,639243-639253,639255-639486,639488-639601,639603-639835,639837-639917,639919-640056,640058-640710,640712-641156,641158-641184,641186-641795,641797-641798,641800-641933,641935-641963,641965-641966,641968-641995,641997-642230,642232-642562,642564-642565,642568-642570,642572-642573,642576-642736,642739-642877,642879,642881-642890,642892-642903,642905-642945,642947-643624,643626-643653,643655-643669,643671,643673-643830,643832-643833,643835-644342,644344-644472,644474-644508,644510-645478 via svnmerge from
https://svn.apache.org:443/repos/asf/poi/trunk ........ r645348 | josh | 2008-04-07 04:02:03 +0100 (Mon, 07 Apr 2008) | 1 line refactored all hssf junits to get test sample data in the in one place ........ r645352 | josh | 2008-04-07 04:23:04 +0100 (Mon, 07 Apr 2008) | 2 lines 30311 - More work on Conditional Formatting - patch from Dmitriy ........ git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@645483 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.java19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFComment.java b/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFComment.java
index 6a977effb8..369aa26658 100644
--- a/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFComment.java
+++ b/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFComment.java
@@ -20,13 +20,14 @@ import junit.framework.TestCase;
import java.io.*;
+import org.apache.poi.hssf.HSSFTestDataSamples;
+
/**
* Tests TestHSSFCellComment.
*
* @author Yegor Kozlov
*/
-
-public class TestHSSFComment extends TestCase {
+public final class TestHSSFComment extends TestCase {
/**
* Test that we can create cells and add comments to it.
@@ -103,12 +104,9 @@ public class TestHSSFComment extends TestCase {
/**
* test that we can read cell comments from an existing workbook.
*/
- public static void testReadComments() throws Exception {
+ public static void testReadComments() {
- String dir = System.getProperty("HSSF.testdata.path");
- FileInputStream is = new FileInputStream(new File(dir, "SimpleWithComments.xls"));
- HSSFWorkbook wb = new HSSFWorkbook(is);
- is.close();
+ HSSFWorkbook wb = HSSFTestDataSamples.openSampleWorkbook("SimpleWithComments.xls");
HSSFSheet sheet = wb.getSheetAt(0);
@@ -143,12 +141,9 @@ public class TestHSSFComment extends TestCase {
/**
* test that we can modify existing cell comments
*/
- public static void testModifyComments() throws Exception {
+ public static void testModifyComments() throws IOException {
- String dir = System.getProperty("HSSF.testdata.path");
- FileInputStream is = new FileInputStream(new File(dir, "SimpleWithComments.xls"));
- HSSFWorkbook wb = new HSSFWorkbook(is);
- is.close();
+ HSSFWorkbook wb = HSSFTestDataSamples.openSampleWorkbook("SimpleWithComments.xls");
HSSFSheet sheet = wb.getSheetAt(0);