convert junit3 to junit4
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1722048 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1dd49eff7c
commit
22b03ba71b
@ -18,13 +18,11 @@
|
|||||||
package org.apache.poi.xssf;
|
package org.apache.poi.xssf;
|
||||||
|
|
||||||
import org.apache.poi.ss.format.TestCellFormatPart;
|
import org.apache.poi.ss.format.TestCellFormatPart;
|
||||||
import org.apache.poi.ss.util.TestCellReference;
|
|
||||||
import org.apache.poi.xssf.eventusermodel.TestXSSFReader;
|
import org.apache.poi.xssf.eventusermodel.TestXSSFReader;
|
||||||
import org.apache.poi.xssf.extractor.TestXSSFExcelExtractor;
|
import org.apache.poi.xssf.extractor.TestXSSFExcelExtractor;
|
||||||
import org.apache.poi.xssf.io.TestLoadSaveXSSF;
|
import org.apache.poi.xssf.io.TestLoadSaveXSSF;
|
||||||
import org.apache.poi.xssf.model.TestCommentsTable;
|
import org.apache.poi.xssf.model.TestCommentsTable;
|
||||||
import org.apache.poi.xssf.model.TestSharedStringsTable;
|
import org.apache.poi.xssf.model.TestSharedStringsTable;
|
||||||
import org.apache.poi.xssf.model.TestStylesTable;
|
|
||||||
import org.apache.poi.xssf.usermodel.AllXSSFUsermodelTests;
|
import org.apache.poi.xssf.usermodel.AllXSSFUsermodelTests;
|
||||||
import org.apache.poi.xssf.util.TestCTColComparator;
|
import org.apache.poi.xssf.util.TestCTColComparator;
|
||||||
import org.apache.poi.xssf.util.TestNumericRanges;
|
import org.apache.poi.xssf.util.TestNumericRanges;
|
||||||
@ -43,7 +41,7 @@ import org.junit.runners.Suite;
|
|||||||
TestLoadSaveXSSF.class,
|
TestLoadSaveXSSF.class,
|
||||||
TestCommentsTable.class,
|
TestCommentsTable.class,
|
||||||
TestSharedStringsTable.class,
|
TestSharedStringsTable.class,
|
||||||
TestStylesTable.class,
|
//TestStylesTable.class, //converted to junit4
|
||||||
//TestCellReference.class, //converted to junit4
|
//TestCellReference.class, //converted to junit4
|
||||||
TestCTColComparator.class,
|
TestCTColComparator.class,
|
||||||
TestNumericRanges.class,
|
TestNumericRanges.class,
|
||||||
|
@ -17,15 +17,19 @@
|
|||||||
|
|
||||||
package org.apache.poi.xssf.model;
|
package org.apache.poi.xssf.model;
|
||||||
|
|
||||||
import junit.framework.TestCase;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertEquals;
|
||||||
|
import static org.junit.Assert.assertNotNull;
|
||||||
|
|
||||||
import org.apache.poi.xssf.XSSFTestDataSamples;
|
import org.apache.poi.xssf.XSSFTestDataSamples;
|
||||||
import org.apache.poi.xssf.usermodel.XSSFCellStyle;
|
import org.apache.poi.xssf.usermodel.XSSFCellStyle;
|
||||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||||
|
|
||||||
public final class TestStylesTable extends TestCase {
|
public final class TestStylesTable {
|
||||||
private String testFile = "Formatting.xlsx";
|
private static final String testFile = "Formatting.xlsx";
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testCreateNew() {
|
public void testCreateNew() {
|
||||||
StylesTable st = new StylesTable();
|
StylesTable st = new StylesTable();
|
||||||
|
|
||||||
@ -36,6 +40,7 @@ public final class TestStylesTable extends TestCase {
|
|||||||
assertEquals(0, st._getNumberFormatSize());
|
assertEquals(0, st._getNumberFormatSize());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testCreateSaveLoad() {
|
public void testCreateSaveLoad() {
|
||||||
XSSFWorkbook wb = new XSSFWorkbook();
|
XSSFWorkbook wb = new XSSFWorkbook();
|
||||||
StylesTable st = wb.getStylesSource();
|
StylesTable st = wb.getStylesSource();
|
||||||
@ -55,6 +60,7 @@ public final class TestStylesTable extends TestCase {
|
|||||||
assertNotNull(XSSFTestDataSamples.writeOutAndReadBack(wb));
|
assertNotNull(XSSFTestDataSamples.writeOutAndReadBack(wb));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testLoadExisting() {
|
public void testLoadExisting() {
|
||||||
XSSFWorkbook workbook = XSSFTestDataSamples.openSampleWorkbook(testFile);
|
XSSFWorkbook workbook = XSSFTestDataSamples.openSampleWorkbook(testFile);
|
||||||
assertNotNull(workbook.getStylesSource());
|
assertNotNull(workbook.getStylesSource());
|
||||||
@ -66,6 +72,7 @@ public final class TestStylesTable extends TestCase {
|
|||||||
assertNotNull(XSSFTestDataSamples.writeOutAndReadBack(workbook));
|
assertNotNull(XSSFTestDataSamples.writeOutAndReadBack(workbook));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
public void testLoadSaveLoad() {
|
public void testLoadSaveLoad() {
|
||||||
XSSFWorkbook workbook = XSSFTestDataSamples.openSampleWorkbook(testFile);
|
XSSFWorkbook workbook = XSSFTestDataSamples.openSampleWorkbook(testFile);
|
||||||
assertNotNull(workbook.getStylesSource());
|
assertNotNull(workbook.getStylesSource());
|
||||||
@ -103,7 +110,8 @@ public final class TestStylesTable extends TestCase {
|
|||||||
assertEquals("yyyy/mm/dd", st.getStyleAt(3).getDataFormatString());
|
assertEquals("yyyy/mm/dd", st.getStyleAt(3).getDataFormatString());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testPopulateNew() {
|
@Test
|
||||||
|
public void populateNew() {
|
||||||
XSSFWorkbook wb = new XSSFWorkbook();
|
XSSFWorkbook wb = new XSSFWorkbook();
|
||||||
StylesTable st = wb.getStylesSource();
|
StylesTable st = wb.getStylesSource();
|
||||||
|
|
||||||
@ -133,7 +141,8 @@ public final class TestStylesTable extends TestCase {
|
|||||||
assertNotNull(XSSFTestDataSamples.writeOutAndReadBack(wb));
|
assertNotNull(XSSFTestDataSamples.writeOutAndReadBack(wb));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testPopulateExisting() {
|
@Test
|
||||||
|
public void populateExisting() {
|
||||||
XSSFWorkbook workbook = XSSFTestDataSamples.openSampleWorkbook(testFile);
|
XSSFWorkbook workbook = XSSFTestDataSamples.openSampleWorkbook(testFile);
|
||||||
assertNotNull(workbook.getStylesSource());
|
assertNotNull(workbook.getStylesSource());
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user