aboutsummaryrefslogtreecommitdiffstats
path: root/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFComment.java
diff options
context:
space:
mode:
authorJosh Micich <josh@apache.org>2009-12-26 02:17:34 +0000
committerJosh Micich <josh@apache.org>2009-12-26 02:17:34 +0000
commitfeafcb8f48e24a6b1967e4cbf9e50d8f1b3224fd (patch)
tree9895a650914dded40eefb3f018702376de7301db /src/testcases/org/apache/poi/hssf/usermodel/TestHSSFComment.java
parent136e09be840acfdf69f77b42725d2c2a6ce1b2f6 (diff)
downloadpoi-feafcb8f48e24a6b1967e4cbf9e50d8f1b3224fd.tar.gz
poi-feafcb8f48e24a6b1967e4cbf9e50d8f1b3224fd.zip
Replaced getInstance methods with field for instances of ITestDataProvider. Some simplification in hierarchy of related tests.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@893929 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.java31
1 files changed, 5 insertions, 26 deletions
diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFComment.java b/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFComment.java
index 0130f9471d..7d04110b12 100644
--- a/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFComment.java
+++ b/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFComment.java
@@ -16,10 +16,8 @@
==================================================================== */
package org.apache.poi.hssf.usermodel;
-import java.io.IOException;
-
-import org.apache.poi.hssf.HSSFTestDataSamples;
import org.apache.poi.hssf.HSSFITestDataProvider;
+import org.apache.poi.hssf.HSSFTestDataSamples;
import org.apache.poi.ss.usermodel.BaseTestCellComment;
/**
@@ -29,39 +27,20 @@ import org.apache.poi.ss.usermodel.BaseTestCellComment;
*/
public final class TestHSSFComment extends BaseTestCellComment {
- @Override
- protected HSSFITestDataProvider getTestDataProvider(){
- return HSSFITestDataProvider.getInstance();
+ public TestHSSFComment() {
+ super(HSSFITestDataProvider.instance);
}
- public static void testDefaultShapeType() throws Exception {
+ public void testDefaultShapeType() {
HSSFComment comment = new HSSFComment((HSSFShape)null, (HSSFAnchor)null);
assertEquals(HSSFSimpleShape.OBJECT_TYPE_COMMENT, comment.getShapeType());
}
/**
- * test that we can read cell comments from an existing workbook.
- */
- public void testReadComments() {
- readComments("SimpleWithComments.xls");
- }
-
- /**
- * test that we can modify existing cell comments
- */
- public void testModifyComments() throws IOException {
- modifyComments("SimpleWithComments.xls");
- }
-
- public void testDeleteComments() throws Exception {
- deleteComments("SimpleWithComments.xls");
- }
-
- /**
* HSSFCell#findCellComment should NOT rely on the order of records
* when matching cells and their cell comments. The correct algorithm is to map
*/
- public static void test47924() {
+ public void test47924() {
HSSFWorkbook wb = HSSFTestDataSamples.openSampleWorkbook("47924.xls");
HSSFSheet sheet = wb.getSheetAt(0);
HSSFCell cell;