When using v4 Junit style, we need to set @Test to make the test-methods actually execute

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1633154 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Dominik Stadler 2014-10-20 13:49:51 +00:00
parent 14f3200486
commit f0d47ab7cb

View File

@ -71,6 +71,7 @@ import org.openxmlformats.schemas.spreadsheetml.x2006.main.STCalcMode;
import org.openxmlformats.schemas.spreadsheetml.x2006.main.STPane; import org.openxmlformats.schemas.spreadsheetml.x2006.main.STPane;
@SuppressWarnings("resource")
public final class TestXSSFSheet extends BaseTestSheet { public final class TestXSSFSheet extends BaseTestSheet {
private static final int ROW_COUNT = 40000; private static final int ROW_COUNT = 40000;
@ -80,6 +81,7 @@ public final class TestXSSFSheet extends BaseTestSheet {
} }
//TODO column styles are not yet supported by XSSF //TODO column styles are not yet supported by XSSF
@Override
@Test @Test
public void defaultColumnStyle() { public void defaultColumnStyle() {
//super.defaultColumnStyle(); //super.defaultColumnStyle();
@ -975,6 +977,7 @@ public final class TestXSSFSheet extends BaseTestSheet {
* Rows and cells can be created in random order, * Rows and cells can be created in random order,
* but CTRows are kept in ascending order * but CTRows are kept in ascending order
*/ */
@Override
@Test @Test
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
public void createRow() { public void createRow() {
@ -1371,6 +1374,7 @@ public final class TestXSSFSheet extends BaseTestSheet {
return wb; return wb;
} }
@Test
public void testCreateTwoPivotTablesInOneSheet(){ public void testCreateTwoPivotTablesInOneSheet(){
XSSFWorkbook wb = setupSheet(); XSSFWorkbook wb = setupSheet();
XSSFSheet sheet = wb.getSheetAt(0); XSSFSheet sheet = wb.getSheetAt(0);
@ -1385,6 +1389,7 @@ public final class TestXSSFSheet extends BaseTestSheet {
assertTrue(wb.getPivotTables().size() > 1); assertTrue(wb.getPivotTables().size() > 1);
} }
@Test
public void testCreateTwoPivotTablesInTwoSheets(){ public void testCreateTwoPivotTablesInTwoSheets(){
XSSFWorkbook wb = setupSheet(); XSSFWorkbook wb = setupSheet();
XSSFSheet sheet = wb.getSheetAt(0); XSSFSheet sheet = wb.getSheetAt(0);
@ -1401,6 +1406,7 @@ public final class TestXSSFSheet extends BaseTestSheet {
assertTrue(wb.getPivotTables().size() > 1); assertTrue(wb.getPivotTables().size() > 1);
} }
@Test
public void testCreatePivotTable(){ public void testCreatePivotTable(){
XSSFWorkbook wb = setupSheet(); XSSFWorkbook wb = setupSheet();
XSSFSheet sheet = wb.getSheetAt(0); XSSFSheet sheet = wb.getSheetAt(0);
@ -1412,6 +1418,7 @@ public final class TestXSSFSheet extends BaseTestSheet {
assertTrue(wb.getPivotTables().size() > 0); assertTrue(wb.getPivotTables().size() > 0);
} }
@Test
public void testCreatePivotTableInOtherSheetThanDataSheet(){ public void testCreatePivotTableInOtherSheetThanDataSheet(){
XSSFWorkbook wb = setupSheet(); XSSFWorkbook wb = setupSheet();
XSSFSheet sheet1 = wb.getSheetAt(0); XSSFSheet sheet1 = wb.getSheetAt(0);
@ -1422,10 +1429,11 @@ public final class TestXSSFSheet extends BaseTestSheet {
assertEquals(0, pivotTable.getRowLabelColumns().size()); assertEquals(0, pivotTable.getRowLabelColumns().size());
assertEquals(1, wb.getPivotTables().size()); assertEquals(1, wb.getPivotTables().size());
assertEquals(1, sheet1.getPivotTables().size()); assertEquals(0, sheet1.getPivotTables().size());
assertEquals(1, sheet2.getPivotTables().size()); assertEquals(1, sheet2.getPivotTables().size());
} }
@Test
public void testCreatePivotTableInOtherSheetThanDataSheetUsingAreaReference(){ public void testCreatePivotTableInOtherSheetThanDataSheetUsingAreaReference(){
XSSFWorkbook wb = setupSheet(); XSSFWorkbook wb = setupSheet();
XSSFSheet sheet = wb.getSheetAt(0); XSSFSheet sheet = wb.getSheetAt(0);
@ -1436,14 +1444,14 @@ public final class TestXSSFSheet extends BaseTestSheet {
assertEquals(0, pivotTable.getRowLabelColumns().size()); assertEquals(0, pivotTable.getRowLabelColumns().size());
} }
@Test
public void testCreatePivotTableWithConflictingDataSheets(){ public void testCreatePivotTableWithConflictingDataSheets(){
XSSFWorkbook wb = setupSheet(); XSSFWorkbook wb = setupSheet();
XSSFSheet sheet = wb.getSheetAt(0); XSSFSheet sheet = wb.getSheetAt(0);
XSSFSheet sheet2 = wb.createSheet(); XSSFSheet sheet2 = wb.createSheet();
try { try {
XSSFPivotTable pivotTable = sheet2.createPivotTable sheet2.createPivotTable(new AreaReference(sheet.getSheetName()+"!A$1:B$2"), new CellReference("H5"), sheet2);
(new AreaReference(sheet.getSheetName()+"!A$1:B$2"), new CellReference("H5"), sheet2);
} catch(IllegalArgumentException e) { } catch(IllegalArgumentException e) {
return; return;
} }