poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cen...@apache.org
Subject svn commit: r1633154 - /poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFSheet.java
Date Mon, 20 Oct 2014 13:49:51 GMT
Author: centic
Date: Mon Oct 20 13:49:51 2014
New Revision: 1633154

URL: http://svn.apache.org/r1633154
Log:
When using v4 Junit style, we need to set @Test to make the test-methods actually execute

Modified:
    poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFSheet.java

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFSheet.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFSheet.java?rev=1633154&r1=1633153&r2=1633154&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFSheet.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFSheet.java Mon Oct
20 13:49:51 2014
@@ -71,6 +71,7 @@ import org.openxmlformats.schemas.spread
 import org.openxmlformats.schemas.spreadsheetml.x2006.main.STPane;
 
 
+@SuppressWarnings("resource")
 public final class TestXSSFSheet extends BaseTestSheet {
 
     private static final int ROW_COUNT = 40000;
@@ -80,6 +81,7 @@ public final class TestXSSFSheet extends
     }
 
     //TODO column styles are not yet supported by XSSF
+    @Override
     @Test
     public void defaultColumnStyle() {
         //super.defaultColumnStyle();
@@ -975,6 +977,7 @@ public final class TestXSSFSheet extends
      * Rows and cells can be created in random order,
      * but CTRows are kept in ascending order
      */
+    @Override
     @Test
     @SuppressWarnings("deprecation")
     public void createRow() {
@@ -1371,6 +1374,7 @@ public final class TestXSSFSheet extends
         return wb;
     }
 
+    @Test
     public void testCreateTwoPivotTablesInOneSheet(){
         XSSFWorkbook wb = setupSheet();
         XSSFSheet sheet = wb.getSheetAt(0);
@@ -1385,6 +1389,7 @@ public final class TestXSSFSheet extends
         assertTrue(wb.getPivotTables().size() > 1);
     }
 
+    @Test
     public void testCreateTwoPivotTablesInTwoSheets(){
         XSSFWorkbook wb = setupSheet();
         XSSFSheet sheet = wb.getSheetAt(0);
@@ -1401,6 +1406,7 @@ public final class TestXSSFSheet extends
         assertTrue(wb.getPivotTables().size() > 1);
     }
 
+    @Test
     public void testCreatePivotTable(){
         XSSFWorkbook wb = setupSheet();
         XSSFSheet sheet = wb.getSheetAt(0);
@@ -1412,6 +1418,7 @@ public final class TestXSSFSheet extends
         assertTrue(wb.getPivotTables().size() > 0);
     }
 
+    @Test
     public void testCreatePivotTableInOtherSheetThanDataSheet(){
         XSSFWorkbook wb = setupSheet();
         XSSFSheet sheet1 = wb.getSheetAt(0);
@@ -1422,10 +1429,11 @@ public final class TestXSSFSheet extends
         assertEquals(0, pivotTable.getRowLabelColumns().size());
         
         assertEquals(1, wb.getPivotTables().size());
-        assertEquals(1, sheet1.getPivotTables().size());
+        assertEquals(0, sheet1.getPivotTables().size());
         assertEquals(1, sheet2.getPivotTables().size());
     }
 
+    @Test
     public void testCreatePivotTableInOtherSheetThanDataSheetUsingAreaReference(){
         XSSFWorkbook wb = setupSheet();
         XSSFSheet sheet = wb.getSheetAt(0);
@@ -1436,14 +1444,14 @@ public final class TestXSSFSheet extends
         assertEquals(0, pivotTable.getRowLabelColumns().size());
     }
 
+    @Test
     public void testCreatePivotTableWithConflictingDataSheets(){
         XSSFWorkbook wb = setupSheet();
         XSSFSheet sheet = wb.getSheetAt(0);
         XSSFSheet sheet2 = wb.createSheet();
 
         try {
-            XSSFPivotTable pivotTable = sheet2.createPivotTable
-                (new AreaReference(sheet.getSheetName()+"!A$1:B$2"), new CellReference("H5"),
sheet2);
+            sheet2.createPivotTable(new AreaReference(sheet.getSheetName()+"!A$1:B$2"), new
CellReference("H5"), sheet2);
         } catch(IllegalArgumentException e) {
             return;
         }



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


Mime
View raw message