poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From one...@apache.org
Subject svn commit: r1711910 - in /poi/trunk/src: ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFHyperlink.java testcases/org/apache/poi/hssf/usermodel/TestHSSFHyperlink.java
Date Mon, 02 Nov 2015 09:01:23 GMT
Author: onealj
Date: Mon Nov  2 09:01:23 2015
New Revision: 1711910

URL: http://svn.apache.org/viewvc?rev=1711910&view=rev
Log:
upgrade spreadsheet Hyperlink unit tests from junit3 to junit4

Modified:
    poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFHyperlink.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFHyperlink.java

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFHyperlink.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFHyperlink.java?rev=1711910&r1=1711909&r2=1711910&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFHyperlink.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFHyperlink.java Mon
Nov  2 09:01:23 2015
@@ -32,12 +32,14 @@ import org.apache.poi.ss.usermodel.Hyper
 import org.apache.poi.ss.usermodel.Row;
 import org.apache.poi.xssf.XSSFITestDataProvider;
 import org.apache.poi.xssf.XSSFTestDataSamples;
+import org.junit.Test;
 
 public final class TestXSSFHyperlink extends BaseTestHyperlink {
 	public TestXSSFHyperlink() {
 		super(XSSFITestDataProvider.instance);
 	}
 
+	@Test
 	public void testLoadExisting() {
 		XSSFWorkbook workbook = XSSFTestDataSamples.openSampleWorkbook("WithMoreVariousData.xlsx");
 		assertEquals(3, workbook.getNumberOfSheets());
@@ -49,6 +51,7 @@ public final class TestXSSFHyperlink ext
 		doTestHyperlinkContents(sheet);
 	}
 
+    @Test
     public void testCreate() throws Exception {
         XSSFWorkbook workbook = new XSSFWorkbook();
         XSSFSheet sheet = workbook.createSheet();
@@ -91,6 +94,7 @@ public final class TestXSSFHyperlink ext
         }
     }
 
+    @Test
     public void testInvalidURLs() throws IOException {
         XSSFWorkbook workbook = new XSSFWorkbook();
         XSSFCreationHelper createHelper = workbook.getCreationHelper();
@@ -111,6 +115,7 @@ public final class TestXSSFHyperlink ext
         workbook.close();
     }
 
+    @Test
     public void testLoadSave() {
 		XSSFWorkbook workbook = XSSFTestDataSamples.openSampleWorkbook("WithMoreVariousData.xlsx");
 		CreationHelper createHelper = workbook.getCreationHelper();
@@ -222,6 +227,7 @@ public final class TestXSSFHyperlink ext
 				sheet.getRow(16).getCell(2).getHyperlink().getAddress());
 	}
 
+    @Test
     public void test52716() {
         XSSFWorkbook wb1 = XSSFTestDataSamples.openSampleWorkbook("52716.xlsx");
         XSSFSheet sh1 = wb1.getSheetAt(0);
@@ -241,6 +247,7 @@ public final class TestXSSFHyperlink ext
         assertEquals("B1", l2.getCellRef());
     }
 
+    @Test
     public void test53734() {
         XSSFWorkbook wb = XSSFTestDataSamples.openSampleWorkbook("53734.xlsx");
         XSSFHyperlink link = wb.getSheetAt(0).getRow(0).getCell(0).getHyperlink();
@@ -251,6 +258,7 @@ public final class TestXSSFHyperlink ext
         assertEquals("javascript:///", link.getAddress());
     }
 
+    @Test
     public void test53282() {
         XSSFWorkbook wb = XSSFTestDataSamples.openSampleWorkbook("53282.xlsx");
         XSSFHyperlink link = wb.getSheetAt(0).getRow(0).getCell(14).getHyperlink();

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFHyperlink.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFHyperlink.java?rev=1711910&r1=1711909&r2=1711910&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFHyperlink.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFHyperlink.java Mon Nov 
2 09:01:23 2015
@@ -88,6 +88,7 @@ public final class TestHSSFHyperlink ext
         assertEquals(HSSFHyperlink.LINK_DOCUMENT, link.getType());
     }
 
+    @Test
     public void testModify() {
         HSSFWorkbook wb = HSSFTestDataSamples.openSampleWorkbook("HyperlinksOnManySheets.xls");
 
@@ -118,6 +119,7 @@ public final class TestHSSFHyperlink ext
      *  link.setAddress("'Target Sheet-1'!A1"); //common between XSSF and HSSF
      * @throws IOException 
      */
+    @Test
     public void testCreateDocumentLink() throws IOException {
         HSSFWorkbook wb = new HSSFWorkbook();
 
@@ -164,6 +166,7 @@ public final class TestHSSFHyperlink ext
         wbBack.close();
     }
 
+    @Test
     public void testCloneSheet() {
         HSSFWorkbook wb = HSSFTestDataSamples.openSampleWorkbook("HyperlinksOnManySheets.xls");
 
@@ -183,6 +186,7 @@ public final class TestHSSFHyperlink ext
         assertEquals("http://poi.apache.org/hssf/", link.getAddress());
     }
 
+    @Test
     public void testCreate() throws IOException {
         HSSFWorkbook wb = new HSSFWorkbook();
 
@@ -214,6 +218,7 @@ public final class TestHSSFHyperlink ext
      * Test that HSSFSheet#shiftRows moves hyperlinks,
      * see bugs #46445 and #29957
      */
+    @Test
     public void testShiftRows(){
         HSSFWorkbook wb = HSSFTestDataSamples.openSampleWorkbook("46445.xls");
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message