poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From one...@apache.org
Subject svn commit: r1722047 - /poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/model/TestStylesTable.java
Date Tue, 29 Dec 2015 01:18:17 GMT
Author: onealj
Date: Tue Dec 29 01:18:16 2015
New Revision: 1722047

URL: http://svn.apache.org/viewvc?rev=1722047&view=rev
Log:
whitespace

Modified:
    poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/model/TestStylesTable.java

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/model/TestStylesTable.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/model/TestStylesTable.java?rev=1722047&r1=1722046&r2=1722047&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/model/TestStylesTable.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/model/TestStylesTable.java Tue Dec 29
01:18:16 2015
@@ -24,138 +24,138 @@ import org.apache.poi.xssf.usermodel.XSS
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 
 public final class TestStylesTable extends TestCase {
-	private String testFile = "Formatting.xlsx";
+    private String testFile = "Formatting.xlsx";
 
-	public void testCreateNew() {
-		StylesTable st = new StylesTable();
+    public void testCreateNew() {
+        StylesTable st = new StylesTable();
 
-		// Check defaults
-		assertNotNull(st.getCTStylesheet());
-		assertEquals(1, st._getXfsSize());
-		assertEquals(1, st._getStyleXfsSize());
-		assertEquals(0, st._getNumberFormatSize());
-	}
-
-	public void testCreateSaveLoad() {
-		XSSFWorkbook wb = new XSSFWorkbook();
-		StylesTable st = wb.getStylesSource();
-
-		assertNotNull(st.getCTStylesheet());
-		assertEquals(1, st._getXfsSize());
-		assertEquals(1, st._getStyleXfsSize());
-		assertEquals(0, st._getNumberFormatSize());
-
-		st = XSSFTestDataSamples.writeOutAndReadBack(wb).getStylesSource();
-
-		assertNotNull(st.getCTStylesheet());
-		assertEquals(1, st._getXfsSize());
-		assertEquals(1, st._getStyleXfsSize());
-		assertEquals(0, st._getNumberFormatSize());
+        // Check defaults
+        assertNotNull(st.getCTStylesheet());
+        assertEquals(1, st._getXfsSize());
+        assertEquals(1, st._getStyleXfsSize());
+        assertEquals(0, st._getNumberFormatSize());
+    }
+
+    public void testCreateSaveLoad() {
+        XSSFWorkbook wb = new XSSFWorkbook();
+        StylesTable st = wb.getStylesSource();
+
+        assertNotNull(st.getCTStylesheet());
+        assertEquals(1, st._getXfsSize());
+        assertEquals(1, st._getStyleXfsSize());
+        assertEquals(0, st._getNumberFormatSize());
+
+        st = XSSFTestDataSamples.writeOutAndReadBack(wb).getStylesSource();
+
+        assertNotNull(st.getCTStylesheet());
+        assertEquals(1, st._getXfsSize());
+        assertEquals(1, st._getStyleXfsSize());
+        assertEquals(0, st._getNumberFormatSize());
         
         assertNotNull(XSSFTestDataSamples.writeOutAndReadBack(wb));
-	}
+    }
 
-	public void testLoadExisting() {
-		XSSFWorkbook workbook = XSSFTestDataSamples.openSampleWorkbook(testFile);
-		assertNotNull(workbook.getStylesSource());
+    public void testLoadExisting() {
+        XSSFWorkbook workbook = XSSFTestDataSamples.openSampleWorkbook(testFile);
+        assertNotNull(workbook.getStylesSource());
 
-		StylesTable st = workbook.getStylesSource();
+        StylesTable st = workbook.getStylesSource();
 
-		doTestExisting(st);
+        doTestExisting(st);
         
         assertNotNull(XSSFTestDataSamples.writeOutAndReadBack(workbook));
-	}
+    }
 
-	public void testLoadSaveLoad() {
-		XSSFWorkbook workbook = XSSFTestDataSamples.openSampleWorkbook(testFile);
-		assertNotNull(workbook.getStylesSource());
-
-		StylesTable st = workbook.getStylesSource();
-		doTestExisting(st);
-
-		st = XSSFTestDataSamples.writeOutAndReadBack(workbook).getStylesSource();
-		doTestExisting(st);
-	}
-
-	public void doTestExisting(StylesTable st) {
-		// Check contents
-		assertNotNull(st.getCTStylesheet());
-		assertEquals(11, st._getXfsSize());
-		assertEquals(1, st._getStyleXfsSize());
-		assertEquals(8, st._getNumberFormatSize());
-
-		assertEquals(2, st.getFonts().size());
-		assertEquals(2, st.getFills().size());
-		assertEquals(1, st.getBorders().size());
-
-		assertEquals("yyyy/mm/dd", st.getNumberFormatAt(165));
-		assertEquals("yy/mm/dd", st.getNumberFormatAt(167));
-
-		assertNotNull(st.getStyleAt(0));
-		assertNotNull(st.getStyleAt(1));
-		assertNotNull(st.getStyleAt(2));
-
-		assertEquals(0, st.getStyleAt(0).getDataFormat());
-		assertEquals(14, st.getStyleAt(1).getDataFormat());
-		assertEquals(0, st.getStyleAt(2).getDataFormat());
-		assertEquals(165, st.getStyleAt(3).getDataFormat());
-
-		assertEquals("yyyy/mm/dd", st.getStyleAt(3).getDataFormatString());
-	}
-
-	public void testPopulateNew() {
-		XSSFWorkbook wb = new XSSFWorkbook();
-		StylesTable st = wb.getStylesSource();
-
-		assertNotNull(st.getCTStylesheet());
-		assertEquals(1, st._getXfsSize());
-		assertEquals(1, st._getStyleXfsSize());
-		assertEquals(0, st._getNumberFormatSize());
-
-		int nf1 = st.putNumberFormat("yyyy-mm-dd");
-		int nf2 = st.putNumberFormat("yyyy-mm-DD");
-		assertEquals(nf1, st.putNumberFormat("yyyy-mm-dd"));
-
-		st.putStyle(new XSSFCellStyle(st));
-
-		// Save and re-load
-		st = XSSFTestDataSamples.writeOutAndReadBack(wb).getStylesSource();
-
-		assertNotNull(st.getCTStylesheet());
-		assertEquals(2, st._getXfsSize());
-		assertEquals(1, st._getStyleXfsSize());
-		assertEquals(2, st._getNumberFormatSize());
-
-		assertEquals("yyyy-mm-dd", st.getNumberFormatAt(nf1));
-		assertEquals(nf1, st.putNumberFormat("yyyy-mm-dd"));
-		assertEquals(nf2, st.putNumberFormat("yyyy-mm-DD"));
+    public void testLoadSaveLoad() {
+        XSSFWorkbook workbook = XSSFTestDataSamples.openSampleWorkbook(testFile);
+        assertNotNull(workbook.getStylesSource());
+
+        StylesTable st = workbook.getStylesSource();
+        doTestExisting(st);
+
+        st = XSSFTestDataSamples.writeOutAndReadBack(workbook).getStylesSource();
+        doTestExisting(st);
+    }
+
+    public void doTestExisting(StylesTable st) {
+        // Check contents
+        assertNotNull(st.getCTStylesheet());
+        assertEquals(11, st._getXfsSize());
+        assertEquals(1, st._getStyleXfsSize());
+        assertEquals(8, st._getNumberFormatSize());
+
+        assertEquals(2, st.getFonts().size());
+        assertEquals(2, st.getFills().size());
+        assertEquals(1, st.getBorders().size());
+
+        assertEquals("yyyy/mm/dd", st.getNumberFormatAt(165));
+        assertEquals("yy/mm/dd", st.getNumberFormatAt(167));
+
+        assertNotNull(st.getStyleAt(0));
+        assertNotNull(st.getStyleAt(1));
+        assertNotNull(st.getStyleAt(2));
+
+        assertEquals(0, st.getStyleAt(0).getDataFormat());
+        assertEquals(14, st.getStyleAt(1).getDataFormat());
+        assertEquals(0, st.getStyleAt(2).getDataFormat());
+        assertEquals(165, st.getStyleAt(3).getDataFormat());
+
+        assertEquals("yyyy/mm/dd", st.getStyleAt(3).getDataFormatString());
+    }
+
+    public void testPopulateNew() {
+        XSSFWorkbook wb = new XSSFWorkbook();
+        StylesTable st = wb.getStylesSource();
+
+        assertNotNull(st.getCTStylesheet());
+        assertEquals(1, st._getXfsSize());
+        assertEquals(1, st._getStyleXfsSize());
+        assertEquals(0, st._getNumberFormatSize());
+
+        int nf1 = st.putNumberFormat("yyyy-mm-dd");
+        int nf2 = st.putNumberFormat("yyyy-mm-DD");
+        assertEquals(nf1, st.putNumberFormat("yyyy-mm-dd"));
+
+        st.putStyle(new XSSFCellStyle(st));
+
+        // Save and re-load
+        st = XSSFTestDataSamples.writeOutAndReadBack(wb).getStylesSource();
+
+        assertNotNull(st.getCTStylesheet());
+        assertEquals(2, st._getXfsSize());
+        assertEquals(1, st._getStyleXfsSize());
+        assertEquals(2, st._getNumberFormatSize());
+
+        assertEquals("yyyy-mm-dd", st.getNumberFormatAt(nf1));
+        assertEquals(nf1, st.putNumberFormat("yyyy-mm-dd"));
+        assertEquals(nf2, st.putNumberFormat("yyyy-mm-DD"));
         
         assertNotNull(XSSFTestDataSamples.writeOutAndReadBack(wb));
-	}
+    }
 
-	public void testPopulateExisting() {
-		XSSFWorkbook workbook = XSSFTestDataSamples.openSampleWorkbook(testFile);
-		assertNotNull(workbook.getStylesSource());
-
-		StylesTable st = workbook.getStylesSource();
-		assertEquals(11, st._getXfsSize());
-		assertEquals(1, st._getStyleXfsSize());
-		assertEquals(8, st._getNumberFormatSize());
-
-		int nf1 = st.putNumberFormat("YYYY-mm-dd");
-		int nf2 = st.putNumberFormat("YYYY-mm-DD");
-		assertEquals(nf1, st.putNumberFormat("YYYY-mm-dd"));
-
-		st = XSSFTestDataSamples.writeOutAndReadBack(workbook).getStylesSource();
-
-		assertEquals(11, st._getXfsSize());
-		assertEquals(1, st._getStyleXfsSize());
-		assertEquals(10, st._getNumberFormatSize());
-
-		assertEquals("YYYY-mm-dd", st.getNumberFormatAt(nf1));
-		assertEquals(nf1, st.putNumberFormat("YYYY-mm-dd"));
-		assertEquals(nf2, st.putNumberFormat("YYYY-mm-DD"));
+    public void testPopulateExisting() {
+        XSSFWorkbook workbook = XSSFTestDataSamples.openSampleWorkbook(testFile);
+        assertNotNull(workbook.getStylesSource());
+
+        StylesTable st = workbook.getStylesSource();
+        assertEquals(11, st._getXfsSize());
+        assertEquals(1, st._getStyleXfsSize());
+        assertEquals(8, st._getNumberFormatSize());
+
+        int nf1 = st.putNumberFormat("YYYY-mm-dd");
+        int nf2 = st.putNumberFormat("YYYY-mm-DD");
+        assertEquals(nf1, st.putNumberFormat("YYYY-mm-dd"));
+
+        st = XSSFTestDataSamples.writeOutAndReadBack(workbook).getStylesSource();
+
+        assertEquals(11, st._getXfsSize());
+        assertEquals(1, st._getStyleXfsSize());
+        assertEquals(10, st._getNumberFormatSize());
+
+        assertEquals("YYYY-mm-dd", st.getNumberFormatAt(nf1));
+        assertEquals(nf1, st.putNumberFormat("YYYY-mm-dd"));
+        assertEquals(nf2, st.putNumberFormat("YYYY-mm-DD"));
         
         assertNotNull(XSSFTestDataSamples.writeOutAndReadBack(workbook));
-	}
+    }
 }



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


Mime
View raw message