upgrade spreadsheet Hyperlink unit tests from junit3 to junit4

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1711909 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Javen O'Neal 2015-11-02 08:55:45 +00:00
parent 3753893f1a
commit 0e3230f703
4 changed files with 18 additions and 3 deletions

View 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();
}

View 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;

View File

@ -17,12 +17,18 @@
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");

View 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();