]> source.dussan.org Git - poi.git/commitdiff
upgrade spreadsheet Hyperlink unit tests from junit3 to junit4
authorJaven O'Neal <onealj@apache.org>
Mon, 2 Nov 2015 08:55:45 +0000 (08:55 +0000)
committerJaven O'Neal <onealj@apache.org>
Mon, 2 Nov 2015 08:55:45 +0000 (08:55 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1711909 13f79535-47bb-0310-9956-ffa450edef68

src/ooxml/testcases/org/apache/poi/xssf/streaming/TestSXSSFHyperlink.java
src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFHyperlink.java
src/testcases/org/apache/poi/hssf/usermodel/TestHSSFHyperlink.java
src/testcases/org/apache/poi/ss/usermodel/BaseTestHyperlink.java

index 9cad4c10cf590af8bf6eeb625be6c84db52b228e..51aa9959ba4efc71daf171478d4273b4b3d4a31d 100644 (file)
@@ -19,6 +19,8 @@
 
 package org.apache.poi.xssf.streaming;
 
+import org.junit.After;
+
 import org.apache.poi.ss.usermodel.BaseTestHyperlink;
 import org.apache.poi.xssf.SXSSFITestDataProvider;
 
@@ -34,7 +36,7 @@ public class TestSXSSFHyperlink extends BaseTestHyperlink {
     }
 
 
-    @Override
+    @After
     public void tearDown(){
         SXSSFITestDataProvider.instance.cleanup();
     }
index 6f8c3f087c26af1afe1aedd1bde49dad78ec89cf..a10b373de7fbeb0aaa8f95c9deabab1ef486b00e 100644 (file)
@@ -19,6 +19,10 @@ package org.apache.poi.xssf.usermodel;
 
 import java.io.IOException;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.fail;
+
 import org.apache.poi.openxml4j.opc.PackageRelationship;
 import org.apache.poi.openxml4j.opc.PackageRelationshipCollection;
 import org.apache.poi.ss.usermodel.BaseTestHyperlink;
index ad90fd8a77e037b072c6821c58003955483f7471..885328ff33ede630e8aede3c565b08f8805a2132 100644 (file)
 
 package org.apache.poi.hssf.usermodel;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import org.junit.Test;
+
 import java.io.IOException;
 
 import org.apache.poi.hssf.HSSFITestDataProvider;
 import org.apache.poi.hssf.HSSFTestDataSamples;
 import org.apache.poi.ss.usermodel.BaseTestHyperlink;
 
+
 /**
  * Tests HSSFHyperlink.
  *
@@ -36,6 +42,7 @@ public final class TestHSSFHyperlink extends BaseTestHyperlink {
     /**
      * Test that we can read hyperlinks.
      */
+    @Test
     public void testRead() {
 
         HSSFWorkbook wb = HSSFTestDataSamples.openSampleWorkbook("HyperlinksOnManySheets.xls");
index e0be21b0fd4f1c93fc1609fc20d67e93f5a8be46..51148f8041e76d03dbabd7e5b6f1884880d5d800 100644 (file)
@@ -17,7 +17,8 @@
 
 package org.apache.poi.ss.usermodel;
 
-import junit.framework.TestCase;
+import static org.junit.Assert.assertEquals;
+import org.junit.Test;
 
 import org.apache.poi.ss.ITestDataProvider;
 
@@ -26,7 +27,7 @@ import org.apache.poi.ss.ITestDataProvider;
  *
  * @author Yegor Kozlov
  */
-public abstract class BaseTestHyperlink extends TestCase {
+public abstract class BaseTestHyperlink {
 
     private final ITestDataProvider _testDataProvider;
 
@@ -34,6 +35,7 @@ public abstract class BaseTestHyperlink extends TestCase {
         _testDataProvider = testDataProvider;
     }
 
+    @Test
     public final void testBasicTypes(){
         Workbook wb = _testDataProvider.createWorkbook();
         CreationHelper createHelper = wb.getCreationHelper();