You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by jo...@apache.org on 2008/09/30 08:42:32 UTC
svn commit: r700359 [4/4] - in /poi/branches/ooxml: ./
src/documentation/content/xdocs/
src/java/org/apache/poi/hssf/eventusermodel/dummyrecord/
src/java/org/apache/poi/hssf/model/ src/java/org/apache/poi/hssf/record/
src/java/org/apache/poi/hssf/userm...
Modified: poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestCategorySeriesAxisRecord.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestCategorySeriesAxisRecord.java?rev=700359&r1=700358&r2=700359&view=diff
==============================================================================
--- poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestCategorySeriesAxisRecord.java (original)
+++ poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestCategorySeriesAxisRecord.java Mon Sep 29 23:42:27 2008
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -15,8 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-
-
package org.apache.poi.hssf.record;
@@ -31,9 +28,7 @@
* @author Glen Stampoultzis (glens at apache.org)
*/
-public class TestCategorySeriesAxisRecord
- extends TestCase
-{
+public final class TestCategorySeriesAxisRecord extends TestCase {
byte[] data = new byte[] {
(byte)0x01,(byte)0x00, // crossing point
(byte)0x01,(byte)0x00, // label frequency
@@ -41,14 +36,7 @@
(byte)0x01,(byte)0x00 // options
};
- public TestCategorySeriesAxisRecord(String name)
- {
- super(name);
- }
-
- public void testLoad()
- throws Exception
- {
+ public void testLoad() {
CategorySeriesAxisRecord record = new CategorySeriesAxisRecord(new TestcaseRecordInputStream((short)0x1020, (short)data.length, data));
assertEquals( 1, record.getCrossingPoint());
@@ -59,10 +47,7 @@
assertEquals( false, record.isCrossesFarRight() );
assertEquals( false, record.isReversed() );
-
assertEquals( 4 + 8, record.getRecordSize() );
-
- record.validateSid((short)0x1020);
}
public void testStore()
Modified: poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestChartRecord.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestChartRecord.java?rev=700359&r1=700358&r2=700359&view=diff
==============================================================================
--- poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestChartRecord.java (original)
+++ poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestChartRecord.java Mon Sep 29 23:42:27 2008
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -15,8 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-
-
package org.apache.poi.hssf.record;
@@ -31,9 +28,7 @@
* @author Glen Stampoultzis (glens at apache.org)
*/
-public class TestChartRecord
- extends TestCase
-{
+public final class TestChartRecord extends TestCase {
byte[] data = new byte[] {
(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,
(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,
@@ -41,14 +36,7 @@
(byte)0xC8,(byte)0xCC,(byte)0xE5,(byte)0x00
};
- public TestChartRecord(String name)
- {
- super(name);
- }
-
- public void testLoad()
- throws Exception
- {
+ public void testLoad() {
ChartRecord record = new ChartRecord(new TestcaseRecordInputStream((short)0x1002, (short)data.length, data));
assertEquals( 0, record.getX());
@@ -56,10 +44,7 @@
assertEquals( 30474216, record.getWidth());
assertEquals( 15060168, record.getHeight());
-
assertEquals( 20, record.getRecordSize() );
-
- record.validateSid((short)0x1002);
}
public void testStore()
Modified: poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestCommonObjectDataSubRecord.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestCommonObjectDataSubRecord.java?rev=700359&r1=700358&r2=700359&view=diff
==============================================================================
--- poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestCommonObjectDataSubRecord.java (original)
+++ poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestCommonObjectDataSubRecord.java Mon Sep 29 23:42:27 2008
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -15,8 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-
-
package org.apache.poi.hssf.record;
@@ -31,9 +28,7 @@
* @author Glen Stampoultzis (glens at apache.org)
*/
-public class TestCommonObjectDataSubRecord
- extends TestCase
-{
+public final class TestCommonObjectDataSubRecord extends TestCase {
byte[] data = new byte[] {
(byte)0x12,(byte)0x00,(byte)0x01,(byte)0x00,
(byte)0x01,(byte)0x00,(byte)0x11,(byte)0x60,
@@ -42,16 +37,8 @@
(byte)0x00,(byte)0x00,
};
- public TestCommonObjectDataSubRecord(String name)
- {
- super(name);
- }
-
- public void testLoad()
- throws Exception
- {
+ public void testLoad() {
CommonObjectDataSubRecord record = new CommonObjectDataSubRecord(new TestcaseRecordInputStream((short)0x15, (short)data.length, data));
-
assertEquals( CommonObjectDataSubRecord.OBJECT_TYPE_LIST_BOX, record.getObjectType());
assertEquals( (short)1, record.getObjectId());
@@ -64,8 +51,6 @@
assertEquals( (int)218103808, record.getReserved2());
assertEquals( (int)294, record.getReserved3());
assertEquals( 22 , record.getRecordSize() );
-
- record.validateSid((short)0x15);
}
public void testStore()
Modified: poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestDatRecord.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestDatRecord.java?rev=700359&r1=700358&r2=700359&view=diff
==============================================================================
--- poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestDatRecord.java (original)
+++ poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestDatRecord.java Mon Sep 29 23:42:27 2008
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -15,8 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-
-
package org.apache.poi.hssf.record;
@@ -31,21 +28,12 @@
* @author Glen Stampoultzis (glens at apache.org)
*/
-public class TestDatRecord
- extends TestCase
-{
+public final class TestDatRecord extends TestCase {
byte[] data = new byte[] {
(byte)0x0D,(byte)0x00 // options
};
- public TestDatRecord(String name)
- {
- super(name);
- }
-
- public void testLoad()
- throws Exception
- {
+ public void testLoad() {
DatRecord record = new DatRecord(new TestcaseRecordInputStream((short)0x1063, (short)data.length, data));
assertEquals( 0xD, record.getOptions());
@@ -54,10 +42,7 @@
assertEquals( true, record.isBorder() );
assertEquals( true, record.isShowSeriesKey() );
-
assertEquals( 6, record.getRecordSize() );
-
- record.validateSid((short)0x1063);
}
public void testStore()
Modified: poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestDataFormatRecord.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestDataFormatRecord.java?rev=700359&r1=700358&r2=700359&view=diff
==============================================================================
--- poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestDataFormatRecord.java (original)
+++ poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestDataFormatRecord.java Mon Sep 29 23:42:27 2008
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -15,8 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-
-
package org.apache.poi.hssf.record;
@@ -31,9 +28,7 @@
* @author Glen Stampoultzis (glens at apache.org)
*/
-public class TestDataFormatRecord
- extends TestCase
-{
+public final class TestDataFormatRecord extends TestCase {
byte[] data = new byte[] {
(byte)0xFF,(byte)0xFF, // point number
(byte)0x00,(byte)0x00, // series index
@@ -41,14 +36,7 @@
(byte)0x00,(byte)0x00 // format flags
};
- public TestDataFormatRecord(String name)
- {
- super(name);
- }
-
- public void testLoad()
- throws Exception
- {
+ public void testLoad() {
DataFormatRecord record = new DataFormatRecord(new TestcaseRecordInputStream((short)0x1006, (short)data.length, data));
assertEquals( (short)0xFFFF, record.getPointNumber());
@@ -57,10 +45,7 @@
assertEquals( 0, record.getFormatFlags());
assertEquals( false, record.isUseExcel4Colors() );
-
assertEquals( 12, record.getRecordSize() );
-
- record.validateSid((short)0x1006);
}
public void testStore()
Modified: poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestDefaultDataLabelTextPropertiesRecord.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestDefaultDataLabelTextPropertiesRecord.java?rev=700359&r1=700358&r2=700359&view=diff
==============================================================================
--- poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestDefaultDataLabelTextPropertiesRecord.java (original)
+++ poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestDefaultDataLabelTextPropertiesRecord.java Mon Sep 29 23:42:27 2008
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -15,8 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-
-
package org.apache.poi.hssf.record;
@@ -31,29 +28,17 @@
* @author Glen Stampoultzis (glens at apache.org)
*/
-public class TestDefaultDataLabelTextPropertiesRecord
- extends TestCase
-{
+public final class TestDefaultDataLabelTextPropertiesRecord extends TestCase {
byte[] data = new byte[] {
(byte)0x02,(byte)0x00
};
- public TestDefaultDataLabelTextPropertiesRecord(String name)
- {
- super(name);
- }
-
- public void testLoad()
- throws Exception
- {
+ public void testLoad() {
DefaultDataLabelTextPropertiesRecord record = new DefaultDataLabelTextPropertiesRecord(new TestcaseRecordInputStream((short)0x1024, (short)data.length, data));
assertEquals( 2, record.getCategoryDataType());
-
assertEquals( 6, record.getRecordSize() );
-
- record.validateSid((short)0x1024);
}
public void testStore()
Modified: poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestEndSubRecord.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestEndSubRecord.java?rev=700359&r1=700358&r2=700359&view=diff
==============================================================================
--- poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestEndSubRecord.java (original)
+++ poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestEndSubRecord.java Mon Sep 29 23:42:27 2008
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -15,8 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-
-
package org.apache.poi.hssf.record;
@@ -30,28 +27,15 @@
*
* @author Glen Stampoultzis (glens at apache.org)
*/
-public class TestEndSubRecord
- extends TestCase
-{
+public final class TestEndSubRecord extends TestCase {
byte[] data = new byte[] {
};
- public TestEndSubRecord(String name)
- {
- super(name);
- }
-
- public void testLoad()
- throws Exception
- {
+ public void testLoad() {
EndSubRecord record = new EndSubRecord(new TestcaseRecordInputStream((short)0x00, (short)data.length, data));
-
-
assertEquals( 4, record.getRecordSize() );
-
- record.validateSid((short)0x00);
}
public void testStore()
Modified: poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestExtendedFormatRecord.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestExtendedFormatRecord.java?rev=700359&r1=700358&r2=700359&view=diff
==============================================================================
--- poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestExtendedFormatRecord.java (original)
+++ poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestExtendedFormatRecord.java Mon Sep 29 23:42:27 2008
@@ -36,14 +36,7 @@
0xC0-256, 0x20 // Fill Palette 20c0
};
- public TestExtendedFormatRecord(String name)
- {
- super(name);
- }
-
- public void testLoad()
- throws Exception
- {
+ public void testLoad() {
ExtendedFormatRecord record = new ExtendedFormatRecord(new TestcaseRecordInputStream((short)0xe0, (short)data.length, data));
assertEquals(0, record.getFontIndex());
assertEquals(0, record.getFormatIndex());
@@ -56,7 +49,6 @@
assertEquals(0x20c0, record.getFillPaletteOptions());
assertEquals( 20 + 4, record.getRecordSize() );
- record.validateSid((short)0xe0);
}
public void testStore()
Modified: poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestFontBasisRecord.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestFontBasisRecord.java?rev=700359&r1=700358&r2=700359&view=diff
==============================================================================
--- poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestFontBasisRecord.java (original)
+++ poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestFontBasisRecord.java Mon Sep 29 23:42:27 2008
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -29,9 +28,7 @@
* @author Glen Stampoultzis (glens at apache.org)
*/
-public class TestFontBasisRecord
- extends TestCase
-{
+public final class TestFontBasisRecord extends TestCase {
byte[] data = new byte[] {
(byte)0x28,(byte)0x1A, // x basis
(byte)0x9C,(byte)0x0F, // y basis
@@ -40,14 +37,7 @@
(byte)0x05,(byte)0x00 // index to font table
};
- public TestFontBasisRecord(String name)
- {
- super(name);
- }
-
- public void testLoad()
- throws Exception
- {
+ public void testLoad() {
FontBasisRecord record = new FontBasisRecord(new TestcaseRecordInputStream((short)0x1060, (short)data.length, data));
assertEquals( 0x1a28, record.getXBasis());
@@ -56,10 +46,7 @@
assertEquals( 0x00, record.getScale());
assertEquals( 0x05, record.getIndexToFontTable());
-
assertEquals( 14, record.getRecordSize() );
-
- record.validateSid((short)0x1060);
}
public void testStore()
Modified: poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestFontIndexRecord.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestFontIndexRecord.java?rev=700359&r1=700358&r2=700359&view=diff
==============================================================================
--- poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestFontIndexRecord.java (original)
+++ poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestFontIndexRecord.java Mon Sep 29 23:42:27 2008
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -15,8 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-
-
package org.apache.poi.hssf.record;
@@ -31,29 +28,17 @@
* @author Glen Stampoultzis (glens at apache.org)
*/
-public class TestFontIndexRecord
- extends TestCase
-{
+public final class TestFontIndexRecord extends TestCase {
byte[] data = new byte[] {
(byte)0x05,(byte)0x00
};
- public TestFontIndexRecord(String name)
- {
- super(name);
- }
-
- public void testLoad()
- throws Exception
- {
+ public void testLoad() {
FontIndexRecord record = new FontIndexRecord(new TestcaseRecordInputStream((short)0x1026, (short)data.length, data));
assertEquals( 5, record.getFontIndex());
-
assertEquals( 6, record.getRecordSize() );
-
- record.validateSid((short)0x1026);
}
public void testStore()
Modified: poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestFontRecord.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestFontRecord.java?rev=700359&r1=700358&r2=700359&view=diff
==============================================================================
--- poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestFontRecord.java (original)
+++ poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestFontRecord.java Mon Sep 29 23:42:27 2008
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -26,9 +25,7 @@
* class works correctly. Test data taken directly from a real
* Excel file.
*/
-public class TestFontRecord
- extends TestCase
-{
+public final class TestFontRecord extends TestCase {
byte[] header = new byte[] {
0x31, 00, 0x1a, 00, // sid=31, 26 bytes long
};
@@ -45,14 +42,7 @@
0x00, 0x61, 0x00, 0x6C, 0x00
};
- public TestFontRecord(String name)
- {
- super(name);
- }
-
- public void testLoad()
- throws Exception
- {
+ public void testLoad() {
FontRecord record = new FontRecord(new TestcaseRecordInputStream((short)0x31, (short)data.length, data));
assertEquals( 0xc8, record.getFontHeight());
@@ -72,7 +62,6 @@
assertEquals( 26 + 4, record.getRecordSize() );
- record.validateSid((short)0x31);
}
public void testStore()
Modified: poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestFrameRecord.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestFrameRecord.java?rev=700359&r1=700358&r2=700359&view=diff
==============================================================================
--- poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestFrameRecord.java (original)
+++ poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestFrameRecord.java Mon Sep 29 23:42:27 2008
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -15,8 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-
-
package org.apache.poi.hssf.record;
@@ -31,22 +28,13 @@
* @author Glen Stampoultzis (glens at apache.org)
*/
-public class TestFrameRecord
- extends TestCase
-{
+public final class TestFrameRecord extends TestCase {
byte[] data = new byte[] {
(byte)0x00,(byte)0x00, // border type
(byte)0x02,(byte)0x00 // options
};
- public TestFrameRecord(String name)
- {
- super(name);
- }
-
- public void testLoad()
- throws Exception
- {
+ public void testLoad() {
FrameRecord record = new FrameRecord(new TestcaseRecordInputStream((short)0x1032, (short)data.length, data));
assertEquals( FrameRecord.BORDER_TYPE_REGULAR, record.getBorderType());
@@ -54,10 +42,7 @@
assertEquals( false, record.isAutoSize() );
assertEquals( true, record.isAutoPosition() );
-
assertEquals( 8, record.getRecordSize() );
-
- record.validateSid((short)0x1032);
}
public void testStore()
Modified: poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestLegendRecord.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestLegendRecord.java?rev=700359&r1=700358&r2=700359&view=diff
==============================================================================
--- poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestLegendRecord.java (original)
+++ poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestLegendRecord.java Mon Sep 29 23:42:27 2008
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -15,8 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-
-
package org.apache.poi.hssf.record;
@@ -31,21 +28,12 @@
* @author Andrew C. Oliver (acoliver at apache.org)
*/
-public class TestLegendRecord
- extends TestCase
-{
+public class TestLegendRecord extends TestCase {
byte[] data = new byte[] {
(byte)0x76,(byte)0x0E,(byte)0x00,(byte)0x00,(byte)0x86,(byte)0x07,(byte)0x00,(byte)0x00,(byte)0x19,(byte)0x01,(byte)0x00,(byte)0x00,(byte)0x8B,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x03,(byte)0x01,(byte)0x1F,(byte)0x00
};
- public TestLegendRecord(String name)
- {
- super(name);
- }
-
- public void testLoad()
- throws Exception
- {
+ public void testLoad() {
LegendRecord record = new LegendRecord(new TestcaseRecordInputStream((short)0x1015, (short)data.length, data));
@@ -71,8 +59,6 @@
assertEquals( 24, record.getRecordSize() );
-
- record.validateSid((short)0x1015);
}
public void testStore()
Modified: poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestLineFormatRecord.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestLineFormatRecord.java?rev=700359&r1=700358&r2=700359&view=diff
==============================================================================
--- poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestLineFormatRecord.java (original)
+++ poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestLineFormatRecord.java Mon Sep 29 23:42:27 2008
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -15,8 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-
-
package org.apache.poi.hssf.record;
@@ -31,9 +28,7 @@
* @author Glen Stampoultzis (glens at apache.org)
*/
-public class TestLineFormatRecord
- extends TestCase
-{
+public class TestLineFormatRecord extends TestCase {
byte[] data = new byte[] {
(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00, // colour
(byte)0x00,(byte)0x00, // pattern
@@ -42,14 +37,7 @@
(byte)0x4D,(byte)0x00 // index
};
- public TestLineFormatRecord(String name)
- {
- super(name);
- }
-
- public void testLoad()
- throws Exception
- {
+ public void testLoad() {
LineFormatRecord record = new LineFormatRecord(new TestcaseRecordInputStream((short)0x1007, (short)data.length, data));
assertEquals( 0, record.getLineColor());
assertEquals( 0, record.getLinePattern());
@@ -59,10 +47,7 @@
assertEquals( false, record.isDrawTicks() );
assertEquals( 0x4d, record.getColourPaletteIndex());
-
assertEquals( 16, record.getRecordSize() );
-
- record.validateSid((short)0x1007);
}
public void testStore()
Modified: poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestLinkedDataRecord.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestLinkedDataRecord.java?rev=700359&r1=700358&r2=700359&view=diff
==============================================================================
--- poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestLinkedDataRecord.java (original)
+++ poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestLinkedDataRecord.java Mon Sep 29 23:42:27 2008
@@ -171,9 +171,6 @@
assertEquals(ptgExpected.toString(), ptgActual.toString());
assertEquals( data.length + 4, record.getRecordSize() );
-
- record.validateSid((short)0x1051);
-
}
public void testStore() {
Modified: poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestNoteRecord.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestNoteRecord.java?rev=700359&r1=700358&r2=700359&view=diff
==============================================================================
--- poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestNoteRecord.java (original)
+++ poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestNoteRecord.java Mon Sep 29 23:42:27 2008
@@ -39,19 +39,11 @@
0x6E, 0x64, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x00
};
- public TestNoteRecord(String name)
- {
- super(name);
- }
-
- public void testRead()
- throws Exception
- {
+ public void testRead() {
NoteRecord record = new NoteRecord(new TestcaseRecordInputStream(NoteRecord.sid, (short)data.length, data));
assertEquals(NoteRecord.sid, record.getSid());
- record.validateSid(NoteRecord.sid);
assertEquals(6, record.getRow());
assertEquals(1, record.getColumn());
assertEquals(NoteRecord.NOTE_VISIBLE, record.getFlags());
@@ -60,11 +52,9 @@
}
- public void testWrite()
- {
+ public void testWrite() {
NoteRecord record = new NoteRecord();
assertEquals(NoteRecord.sid, record.getSid());
- record.validateSid(NoteRecord.sid);
record.setRow((short)6);
record.setColumn((short)1);
Modified: poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestNoteStructureSubRecord.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestNoteStructureSubRecord.java?rev=700359&r1=700358&r2=700359&view=diff
==============================================================================
--- poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestNoteStructureSubRecord.java (original)
+++ poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestNoteStructureSubRecord.java Mon Sep 29 23:42:27 2008
@@ -14,6 +14,7 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
+
package org.apache.poi.hssf.record;
@@ -28,37 +29,24 @@
*
* @author Yegor Kozlov
*/
-public class TestNoteStructureSubRecord
- extends TestCase
-{
+public final class TestNoteStructureSubRecord extends TestCase {
private byte[] data = new byte[] {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, (byte)0x80, 0x00, 0x00, 0x00,
0x00, 0x00, (byte)0xBF, 0x00, 0x00, 0x00, 0x00, 0x00, (byte)0x81, 0x01,
(byte)0xCC, (byte)0xEC
};
- public TestNoteStructureSubRecord(String name)
- {
- super(name);
- }
-
- public void testRead()
- throws Exception
- {
+ public void testRead() {
NoteStructureSubRecord record = new NoteStructureSubRecord(new TestcaseRecordInputStream(NoteStructureSubRecord.sid, (short)data.length, data));
assertEquals(NoteStructureSubRecord.sid, record.getSid());
- record.validateSid(NoteStructureSubRecord.sid);
assertEquals(data.length + 4, record.getRecordSize());
-
}
- public void testWrite()
- {
+ public void testWrite() {
NoteStructureSubRecord record = new NoteStructureSubRecord();
assertEquals(NoteStructureSubRecord.sid, record.getSid());
- record.validateSid(NoteStructureSubRecord.sid);
assertEquals(data.length + 4, record.getRecordSize());
byte [] ser = record.serialize();
Modified: poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestNumberFormatIndexRecord.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestNumberFormatIndexRecord.java?rev=700359&r1=700358&r2=700359&view=diff
==============================================================================
--- poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestNumberFormatIndexRecord.java (original)
+++ poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestNumberFormatIndexRecord.java Mon Sep 29 23:42:27 2008
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -15,8 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-
-
package org.apache.poi.hssf.record;
@@ -31,29 +28,17 @@
* @author Glen Stampoultzis (glens at apache.org)
*/
-public class TestNumberFormatIndexRecord
- extends TestCase
-{
+public final class TestNumberFormatIndexRecord extends TestCase {
byte[] data = new byte[] {
0x05,0x00
};
- public TestNumberFormatIndexRecord(String name)
- {
- super(name);
- }
-
- public void testLoad()
- throws Exception
- {
+ public void testLoad() {
NumberFormatIndexRecord record = new NumberFormatIndexRecord(new TestcaseRecordInputStream((short)0x104e, (short)data.length, data));
assertEquals( 5, record.getFormatIndex());
-
assertEquals( 6, record.getRecordSize() );
-
- record.validateSid((short)0x104e);
}
public void testStore()
Modified: poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestObjectLinkRecord.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestObjectLinkRecord.java?rev=700359&r1=700358&r2=700359&view=diff
==============================================================================
--- poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestObjectLinkRecord.java (original)
+++ poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestObjectLinkRecord.java Mon Sep 29 23:42:27 2008
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -15,8 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-
-
package org.apache.poi.hssf.record;
@@ -31,46 +28,26 @@
* @author Andrew C. Oliver (acoliver at apache.org)
*/
-public class TestObjectLinkRecord
- extends TestCase
-{
+public final class TestObjectLinkRecord extends TestCase {
byte[] data = new byte[] {
(byte)0x03,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00
};
- public TestObjectLinkRecord(String name)
- {
- super(name);
- }
-
- public void testLoad()
- throws Exception
- {
+ public void testLoad() {
ObjectLinkRecord record = new ObjectLinkRecord(new TestcaseRecordInputStream((short)0x1027, (short)data.length, data));
-
assertEquals( (short)3, record.getAnchorId());
-
assertEquals( (short)0x00, record.getLink1());
-
assertEquals( (short)0x00, record.getLink2());
-
assertEquals( 10, record.getRecordSize() );
-
- record.validateSid((short)0x1027);
}
- public void testStore()
- {
+ public void testStore() {
ObjectLinkRecord record = new ObjectLinkRecord();
-
-
record.setAnchorId( (short)3 );
-
record.setLink1( (short)0x00 );
-
record.setLink2( (short)0x00 );
Modified: poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestPaneRecord.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestPaneRecord.java?rev=700359&r1=700358&r2=700359&view=diff
==============================================================================
--- poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestPaneRecord.java (original)
+++ poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestPaneRecord.java Mon Sep 29 23:42:27 2008
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -15,8 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-
-
package org.apache.poi.hssf.record;
@@ -30,9 +27,7 @@
*
* @author Glen Stampoultzis (glens at apache.org)
*/
-public class TestPaneRecord
- extends TestCase
-{
+public final class TestPaneRecord extends TestCase {
byte[] data = new byte[] {
(byte)0x01, (byte)0x00,
(byte)0x02, (byte)0x00,
@@ -41,16 +36,8 @@
(byte)0x02, (byte)0x00,
};
- public TestPaneRecord(String name)
- {
- super(name);
- }
-
- public void testLoad()
- throws Exception
- {
+ public void testLoad() {
PaneRecord record = new PaneRecord(new TestcaseRecordInputStream((short)0x41, (short)data.length, data));
-
assertEquals( (short)1, record.getX());
assertEquals( (short)2, record.getY());
@@ -59,8 +46,6 @@
assertEquals( PaneRecord.ACTIVE_PANE_LOWER_LEFT, record.getActivePane());
assertEquals( 14, record.getRecordSize() );
-
- record.validateSid((short)0x41);
}
public void testStore()
Modified: poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestPlotAreaRecord.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestPlotAreaRecord.java?rev=700359&r1=700358&r2=700359&view=diff
==============================================================================
--- poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestPlotAreaRecord.java (original)
+++ poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestPlotAreaRecord.java Mon Sep 29 23:42:27 2008
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -15,8 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-
-
package org.apache.poi.hssf.record;
@@ -31,37 +28,20 @@
* @author Andrew C. Oliver (acoliver at apache.org)
*/
-public class TestPlotAreaRecord
- extends TestCase
-{
+public final class TestPlotAreaRecord extends TestCase {
byte[] data = new byte[] {
};
- public TestPlotAreaRecord(String name)
- {
- super(name);
- }
-
- public void testLoad()
- throws Exception
- {
+ public void testLoad() {
PlotAreaRecord record = new PlotAreaRecord(new TestcaseRecordInputStream((short)0x1035, (short)data.length, data));
-
-
assertEquals( 4, record.getRecordSize() );
-
- record.validateSid((short)0x1035);
}
- public void testStore()
- {
+ public void testStore() {
PlotAreaRecord record = new PlotAreaRecord();
-
-
-
byte [] recordBytes = record.serialize();
assertEquals(recordBytes.length - 4, data.length);
for (int i = 0; i < data.length; i++)
Modified: poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestPlotGrowthRecord.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestPlotGrowthRecord.java?rev=700359&r1=700358&r2=700359&view=diff
==============================================================================
--- poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestPlotGrowthRecord.java (original)
+++ poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestPlotGrowthRecord.java Mon Sep 29 23:42:27 2008
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -15,8 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-
-
package org.apache.poi.hssf.record;
@@ -30,31 +27,19 @@
*
* @author Glen Stampoultzis (glens at apache.org)
*/
-public class TestPlotGrowthRecord
- extends TestCase
-{
+public final class TestPlotGrowthRecord extends TestCase {
byte[] data = new byte[] {
(byte)0x00,(byte)0x00,(byte)0x01,(byte)0x00, // horizontal
(byte)0x00,(byte)0x00,(byte)0x01,(byte)0x00 // vertical
};
- public TestPlotGrowthRecord(String name)
- {
- super(name);
- }
-
- public void testLoad()
- throws Exception
- {
+ public void testLoad() {
PlotGrowthRecord record = new PlotGrowthRecord(new TestcaseRecordInputStream((short)0x1064, (short)data.length, data));
assertEquals( 65536, record.getHorizontalScale());
assertEquals( 65536, record.getVerticalScale());
-
assertEquals( 12, record.getRecordSize() );
-
- record.validateSid((short)0x1064);
}
public void testStore()
Modified: poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestSCLRecord.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestSCLRecord.java?rev=700359&r1=700358&r2=700359&view=diff
==============================================================================
--- poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestSCLRecord.java (original)
+++ poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestSCLRecord.java Mon Sep 29 23:42:27 2008
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -15,8 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-
-
package org.apache.poi.hssf.record;
@@ -31,29 +28,17 @@
* @author Andrew C. Oliver (acoliver at apache.org)
*/
-public class TestSCLRecord
- extends TestCase
-{
+public final class TestSCLRecord extends TestCase {
byte[] data = new byte[] {
(byte)0x3,(byte)0x0,(byte)0x4,(byte)0x0
};
- public TestSCLRecord(String name)
- {
- super(name);
- }
-
- public void testLoad()
- throws Exception
- {
+ public void testLoad() {
SCLRecord record = new SCLRecord(new TestcaseRecordInputStream((short)0xa0, (short)data.length, data));
assertEquals( 3, record.getNumerator());
assertEquals( 4, record.getDenominator());
-
assertEquals( 8, record.getRecordSize() );
-
- record.validateSid((short)0xa0);
}
public void testStore()
Modified: poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestSeriesChartGroupIndexRecord.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestSeriesChartGroupIndexRecord.java?rev=700359&r1=700358&r2=700359&view=diff
==============================================================================
--- poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestSeriesChartGroupIndexRecord.java (original)
+++ poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestSeriesChartGroupIndexRecord.java Mon Sep 29 23:42:27 2008
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -15,8 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-
-
package org.apache.poi.hssf.record;
@@ -30,29 +27,16 @@
*
* @author Glen Stampoultzis (glens at apache.org)
*/
-public class TestSeriesChartGroupIndexRecord
- extends TestCase
-{
+public final class TestSeriesChartGroupIndexRecord extends TestCase {
byte[] data = new byte[] {
(byte)0x00,(byte)0x00
};
- public TestSeriesChartGroupIndexRecord(String name)
- {
- super(name);
- }
-
- public void testLoad()
- throws Exception
- {
+ public void testLoad() {
SeriesChartGroupIndexRecord record = new SeriesChartGroupIndexRecord(new TestcaseRecordInputStream((short)0x1045, (short)data.length, data));
assertEquals( 0, record.getChartGroupIndex());
-
assertEquals( 6, record.getRecordSize() );
-
- record.validateSid((short)0x1045);
-
}
public void testStore()
Modified: poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestSeriesIndexRecord.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestSeriesIndexRecord.java?rev=700359&r1=700358&r2=700359&view=diff
==============================================================================
--- poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestSeriesIndexRecord.java (original)
+++ poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestSeriesIndexRecord.java Mon Sep 29 23:42:27 2008
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -15,8 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-
-
package org.apache.poi.hssf.record;
@@ -31,30 +28,16 @@
* @author Andrew C. Oliver (acoliver at apache.org)
*/
-public class TestSeriesIndexRecord
- extends TestCase
-{
+public final class TestSeriesIndexRecord extends TestCase {
byte[] data = new byte[] {
(byte)0x03,(byte)0x00
};
- public TestSeriesIndexRecord(String name)
- {
- super(name);
- }
-
- public void testLoad()
- throws Exception
- {
+ public void testLoad() {
SeriesIndexRecord record = new SeriesIndexRecord(new TestcaseRecordInputStream((short)0x1065, (short)data.length, data));
-
assertEquals( (short)3, record.getIndex());
-
-
assertEquals( 6, record.getRecordSize() );
-
- record.validateSid((short)0x1065);
}
public void testStore()
Modified: poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestSeriesLabelsRecord.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestSeriesLabelsRecord.java?rev=700359&r1=700358&r2=700359&view=diff
==============================================================================
--- poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestSeriesLabelsRecord.java (original)
+++ poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestSeriesLabelsRecord.java Mon Sep 29 23:42:27 2008
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -15,8 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-
-
package org.apache.poi.hssf.record;
@@ -31,21 +28,12 @@
* @author Glen Stampoultzis (glens at apache.org)
*/
-public class TestSeriesLabelsRecord
- extends TestCase
-{
+public final class TestSeriesLabelsRecord extends TestCase {
byte[] data = new byte[] {
(byte)0x03,(byte)0x00
};
- public TestSeriesLabelsRecord(String name)
- {
- super(name);
- }
-
- public void testLoad()
- throws Exception
- {
+ public void testLoad() {
SeriesLabelsRecord record = new SeriesLabelsRecord(new TestcaseRecordInputStream((short)0x100c, (short)data.length, data));
assertEquals( 3, record.getFormatFlags());
assertEquals( true, record.isShowActual() );
@@ -57,8 +45,6 @@
assertEquals( 2+4, record.getRecordSize() );
-
- record.validateSid((short)0x100c);
}
public void testStore()
Modified: poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestSeriesListRecord.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestSeriesListRecord.java?rev=700359&r1=700358&r2=700359&view=diff
==============================================================================
--- poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestSeriesListRecord.java (original)
+++ poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestSeriesListRecord.java Mon Sep 29 23:42:27 2008
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -15,8 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-
-
package org.apache.poi.hssf.record;
@@ -31,21 +28,12 @@
* @author Glen Stampoultzis (glens at apache.org)
*/
-public class TestSeriesListRecord
- extends TestCase
-{
+public final class TestSeriesListRecord extends TestCase {
byte[] data = new byte[] {
(byte)0x02,(byte)0x00,(byte)0x01,(byte)0x20,(byte)0xff,(byte)0xf0
};
- public TestSeriesListRecord(String name)
- {
- super(name);
- }
-
- public void testLoad()
- throws Exception
- {
+ public void testLoad() {
SeriesListRecord record = new SeriesListRecord(new TestcaseRecordInputStream((short)0x1016, (short)data.length, data));
assertEquals( (short)0x2001, record.getSeriesNumbers()[0]);
@@ -53,8 +41,6 @@
assertEquals( 2, record.getSeriesNumbers().length);
assertEquals( 4 + 6, record.getRecordSize() );
-
- record.validateSid((short)0x1016);
}
public void testStore()
Modified: poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestSeriesRecord.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestSeriesRecord.java?rev=700359&r1=700358&r2=700359&view=diff
==============================================================================
--- poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestSeriesRecord.java (original)
+++ poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestSeriesRecord.java Mon Sep 29 23:42:27 2008
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -15,8 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-
-
package org.apache.poi.hssf.record;
@@ -30,9 +27,7 @@
*
* @author Glen Stampoultzis (glens at apache.org)
*/
-public class TestSeriesRecord
- extends TestCase
-{
+public final class TestSeriesRecord extends TestCase {
byte[] data = new byte[] {
(byte)0x01,(byte)0x00, // category data type
(byte)0x01,(byte)0x00, // values data type
@@ -42,14 +37,7 @@
(byte)0x00,(byte)0x00 // num bubble values
};
- public TestSeriesRecord(String name)
- {
- super(name);
- }
-
- public void testLoad()
- throws Exception
- {
+ public void testLoad() {
SeriesRecord record = new SeriesRecord(new TestcaseRecordInputStream((short)0x1003, (short)data.length, data));
assertEquals( SeriesRecord.CATEGORY_DATA_TYPE_NUMERIC, record.getCategoryDataType());
@@ -61,8 +49,6 @@
assertEquals( 16, record.getRecordSize() );
-
- record.validateSid((short)0x1003);
}
public void testStore()
Modified: poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestSeriesTextRecord.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestSeriesTextRecord.java?rev=700359&r1=700358&r2=700359&view=diff
==============================================================================
--- poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestSeriesTextRecord.java (original)
+++ poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestSeriesTextRecord.java Mon Sep 29 23:42:27 2008
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -15,8 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-
-
package org.apache.poi.hssf.record;
@@ -31,50 +28,29 @@
* @author Andrew C. Oliver (acoliver at apache.org)
*/
-public class TestSeriesTextRecord
- extends TestCase
-{
+public final class TestSeriesTextRecord extends TestCase {
byte[] data = new byte[] {
(byte)0x00,(byte)0x00,(byte)0x0C,(byte)0x01,(byte)0x56,(byte)0x00,(byte)0x61,(byte)0x00,(byte)0x6C,(byte)0x00,(byte)0x75,(byte)0x00,(byte)0x65,(byte)0x00,(byte)0x20,(byte)0x00,(byte)0x4E,(byte)0x00,(byte)0x75,(byte)0x00,(byte)0x6D,(byte)0x00,(byte)0x62,(byte)0x00,(byte)0x65,(byte)0x00,(byte)0x72,(byte)0x00
};
- public TestSeriesTextRecord(String name)
- {
- super(name);
- }
-
- public void testLoad()
- throws Exception
- {
+ public void testLoad() {
SeriesTextRecord record = new SeriesTextRecord(new TestcaseRecordInputStream((short)0x100d, (short)data.length, data));
-
assertEquals( (short)0, record.getId());
-
assertEquals( (byte)0x0C, record.getTextLength());
-
assertEquals( (byte)0x01, record.getUndocumented());
-
assertEquals( "Value Number", record.getText());
-
assertEquals( 32, record.getRecordSize() );
-
- record.validateSid((short)0x100d);
}
public void testStore()
{
SeriesTextRecord record = new SeriesTextRecord();
-
-
record.setId( (short)0 );
-
record.setTextLength( (byte)0x0C );
-
record.setUndocumented( (byte)0x01 );
-
record.setText( "Value Number" );
Modified: poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestSeriesToChartGroupRecord.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestSeriesToChartGroupRecord.java?rev=700359&r1=700358&r2=700359&view=diff
==============================================================================
--- poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestSeriesToChartGroupRecord.java (original)
+++ poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestSeriesToChartGroupRecord.java Mon Sep 29 23:42:27 2008
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -15,8 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-
-
package org.apache.poi.hssf.record;
@@ -31,28 +28,16 @@
* @author Andrew C. Oliver (acoliver at apache.org)
*/
-public class TestSeriesToChartGroupRecord
- extends TestCase
-{
+public final class TestSeriesToChartGroupRecord extends TestCase {
byte[] data = new byte[] {
(byte)0x0, (byte)0x0
};
- public TestSeriesToChartGroupRecord(String name)
- {
- super(name);
- }
-
- public void testLoad()
- throws Exception
- {
+ public void testLoad() {
SeriesToChartGroupRecord record = new SeriesToChartGroupRecord(new TestcaseRecordInputStream((short)0x1045, (short)data.length, data));
assertEquals( 0x0, record.getChartGroupIndex());
-
assertEquals( 0x6, record.getRecordSize() );
-
- record.validateSid((short)0x1045);
}
public void testStore()
Modified: poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestSheetPropertiesRecord.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestSheetPropertiesRecord.java?rev=700359&r1=700358&r2=700359&view=diff
==============================================================================
--- poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestSheetPropertiesRecord.java (original)
+++ poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestSheetPropertiesRecord.java Mon Sep 29 23:42:27 2008
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -15,8 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-
-
package org.apache.poi.hssf.record;
@@ -31,23 +28,14 @@
* @author Glen Stampoultzis (glens at apache.org)
*/
-public class TestSheetPropertiesRecord
- extends TestCase
-{
+public final class TestSheetPropertiesRecord extends TestCase {
byte[] data = new byte[] {
(byte)0x0A,(byte)0x00,
(byte)0x00
//,(byte)0x00 // not sure where that last byte comes from
};
- public TestSheetPropertiesRecord(String name)
- {
- super(name);
- }
-
- public void testLoad()
- throws Exception
- {
+ public void testLoad() {
SheetPropertiesRecord record = new SheetPropertiesRecord(new TestcaseRecordInputStream((short)0x1044, (short)data.length, data));
assertEquals( 10, record.getFlags());
assertEquals( false, record.isChartTypeManuallyFormatted() );
@@ -59,8 +47,6 @@
assertEquals( 7, record.getRecordSize() );
-
- record.validateSid((short)0x1044);
}
public void testStore()
Modified: poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestStringRecord.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestStringRecord.java?rev=700359&r1=700358&r2=700359&view=diff
==============================================================================
--- poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestStringRecord.java (original)
+++ poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestStringRecord.java Mon Sep 29 23:42:27 2008
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -15,8 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-
-
package org.apache.poi.hssf.record;
@@ -30,9 +27,7 @@
*
* @author Glen Stampoultzis (glens at apache.org)
*/
-public class TestStringRecord
- extends TestCase
-{
+public class TestStringRecord extends TestCase {
byte[] data = new byte[] {
(byte)0x0B,(byte)0x00, // length
(byte)0x00, // option
@@ -40,21 +35,12 @@
(byte)0x46,(byte)0x61,(byte)0x68,(byte)0x72,(byte)0x7A,(byte)0x65,(byte)0x75,(byte)0x67,(byte)0x74,(byte)0x79,(byte)0x70
};
- public TestStringRecord(String name)
- {
- super(name);
- }
-
- public void testLoad()
- throws Exception
- {
+ public void testLoad() {
StringRecord record = new StringRecord(new TestcaseRecordInputStream((short)0x207, (short)data.length, data));
assertEquals( "Fahrzeugtyp", record.getString());
assertEquals( 18, record.getRecordSize() );
-
- record.validateSid((short)0x207);
}
public void testStore()
Modified: poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestSupBookRecord.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestSupBookRecord.java?rev=700359&r1=700358&r2=700359&view=diff
==============================================================================
--- poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestSupBookRecord.java (original)
+++ poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestSupBookRecord.java Mon Sep 29 23:42:27 2008
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -15,8 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-
-
package org.apache.poi.hssf.record;
@@ -49,11 +46,6 @@
(byte)'S', (byte)'h', (byte)'e', (byte)'e', (byte)'t', (byte)'2',
};
- public TestSupBookRecord(String name)
- {
- super(name);
- }
-
/**
* tests that we can load the record
*/
@@ -64,8 +56,6 @@
assertEquals( 0x4, record.getNumberOfSheets() ); //expected # of sheets
assertEquals( 8, record.getRecordSize() ); //sid+size+data
-
- record.validateSid((short)0x01AE);
}
/**
* tests that we can load the record
@@ -83,8 +73,6 @@
assertEquals(2, sheetNames.length);
assertEquals("Sheet1", sheetNames[0].getString());
assertEquals("Sheet2", sheetNames[1].getString());
-
- record.validateSid((short)0x01AE);
}
/**
@@ -96,7 +84,6 @@
assertTrue( record.isAddInFunctions() ); //expected flag
assertEquals( 0x1, record.getNumberOfSheets() ); //expected # of sheets
assertEquals( 8, record.getRecordSize() ); //sid+size+data
- record.validateSid((short)0x01AE);
}
/**
@@ -119,10 +106,4 @@
TestcaseRecordInputStream.confirmRecordEncoding(0x01AE, dataER, record.serialize());
}
-
- public static void main(String [] args) {
- System.out
- .println("Testing org.apache.poi.hssf.record.SupBookRecord");
- junit.textui.TestRunner.run(TestSupBookRecord.class);
- }
}
Modified: poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestTableRecord.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestTableRecord.java?rev=700359&r1=700358&r2=700359&view=diff
==============================================================================
--- poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestTableRecord.java (original)
+++ poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestTableRecord.java Mon Sep 29 23:42:27 2008
@@ -58,7 +58,6 @@
assertEquals(0, record.getColInputCol());
assertEquals( 16 + 4, record.getRecordSize() );
- record.validateSid((short)0x236);
}
public void testStore()
Modified: poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestTextObjectBaseRecord.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestTextObjectBaseRecord.java?rev=700359&r1=700358&r2=700359&view=diff
==============================================================================
--- poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestTextObjectBaseRecord.java (original)
+++ poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestTextObjectBaseRecord.java Mon Sep 29 23:42:27 2008
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -15,8 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-
-
package org.apache.poi.hssf.record;
@@ -31,23 +28,14 @@
* @author Glen Stampoultzis (glens at apache.org)
*/
-public class TestTextObjectBaseRecord
- extends TestCase
-{
+public class TestTextObjectBaseRecord extends TestCase {
byte[] data = new byte[] {
0x44, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00,
0x00, 0x00,
};
- public TestTextObjectBaseRecord(String name)
- {
- super(name);
- }
-
- public void testLoad()
- throws Exception
- {
+ public void testLoad() {
TextObjectBaseRecord record = new TextObjectBaseRecord(new TestcaseRecordInputStream((short)0x1B6, (short)data.length, data));
@@ -68,8 +56,6 @@
assertEquals( 22, record.getRecordSize() );
-
- record.validateSid((short)0x1B6);
}
public void testStore()
Modified: poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestTextObjectRecord.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestTextObjectRecord.java?rev=700359&r1=700358&r2=700359&view=diff
==============================================================================
--- poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestTextObjectRecord.java (original)
+++ poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestTextObjectRecord.java Mon Sep 29 23:42:27 2008
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -18,11 +17,10 @@
package org.apache.poi.hssf.record;
-import junit.framework.*;
-
-import java.util.Arrays;
-import java.util.List;
import java.io.ByteArrayInputStream;
+import java.util.Arrays;
+
+import junit.framework.TestCase;
import org.apache.poi.hssf.usermodel.HSSFRichTextString;
@@ -32,7 +30,7 @@
*
* @author Yegor Kozlov
*/
-public class TestTextObjectRecord extends TestCase {
+public final class TestTextObjectRecord extends TestCase {
byte[] data = {(byte)0xB6, 0x01, 0x12, 0x00, 0x12, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
@@ -42,17 +40,13 @@
0x00, 0x08, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
- public void testRead()
- throws Exception
- {
-
+ public void testRead() {
RecordInputStream is = new RecordInputStream(new ByteArrayInputStream(data));
is.nextRecord();
TextObjectRecord record = new TextObjectRecord(is);
assertEquals(TextObjectRecord.sid, record.getSid());
- record.validateSid(TextObjectRecord.sid);
assertEquals(TextObjectRecord.HORIZONTAL_TEXT_ALIGNMENT_LEFT_ALIGNED, record.getHorizontalTextAlignment());
assertEquals(TextObjectRecord.VERTICAL_TEXT_ALIGNMENT_TOP, record.getVerticalTextAlignment());
assertEquals(TextObjectRecord.TEXT_ORIENTATION_NONE, record.getTextOrientation());
Modified: poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestTextRecord.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestTextRecord.java?rev=700359&r1=700358&r2=700359&view=diff
==============================================================================
--- poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestTextRecord.java (original)
+++ poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestTextRecord.java Mon Sep 29 23:42:27 2008
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -15,8 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-
-
package org.apache.poi.hssf.record;
@@ -30,9 +27,7 @@
*
* @author Glen Stampoultzis (glens at apache.org)
*/
-public class TestTextRecord
- extends TestCase
-{
+public class TestTextRecord extends TestCase {
byte[] data = new byte[] {
(byte)0x02, // horiz align
(byte)0x02, // vert align
@@ -48,14 +43,7 @@
(byte)0x00,(byte)0x00 // text rotation
};
- public TestTextRecord(String name)
- {
- super(name);
- }
-
- public void testLoad()
- throws Exception
- {
+ public void testLoad() {
TextRecord record = new TextRecord(new TestcaseRecordInputStream((short)0x1025, (short)data.length, data));
assertEquals( TextRecord.HORIZONTAL_ALIGNMENT_CENTER, record.getHorizontalAlignment());
@@ -87,9 +75,6 @@
assertEquals( 36, record.getRecordSize() );
-
- record.validateSid((short)0x1025);
-
}
public void testStore()
Modified: poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestTickRecord.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestTickRecord.java?rev=700359&r1=700358&r2=700359&view=diff
==============================================================================
--- poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestTickRecord.java (original)
+++ poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestTickRecord.java Mon Sep 29 23:42:27 2008
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -15,8 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-
-
package org.apache.poi.hssf.record;
@@ -31,9 +28,7 @@
* @author Andrew C. Oliver(acoliver at apache.org)
*/
-public class TestTickRecord
- extends TestCase
-{
+public final class TestTickRecord extends TestCase {
byte[] data = new byte[] {
(byte)0x02, (byte)0x00, (byte)0x03, (byte)0x01,
(byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
@@ -44,14 +39,7 @@
(byte)0x4D, (byte)0x00, (byte)0x00, (byte)0x00
};
- public TestTickRecord(String name)
- {
- super(name);
- }
-
- public void testLoad()
- throws Exception
- {
+ public void testLoad() {
TickRecord record = new TickRecord(new TestcaseRecordInputStream((short)0x101e, (short)data.length, data));
assertEquals( (byte)2, record.getMajorTickType());
assertEquals( (byte)0, record.getMinorTickType());
@@ -70,8 +58,6 @@
assertEquals( 34, record.getRecordSize() );
-
- record.validateSid((short)0x101e);
}
public void testStore()
Modified: poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestUnitsRecord.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestUnitsRecord.java?rev=700359&r1=700358&r2=700359&view=diff
==============================================================================
--- poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestUnitsRecord.java (original)
+++ poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestUnitsRecord.java Mon Sep 29 23:42:27 2008
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -15,8 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-
-
package org.apache.poi.hssf.record;
@@ -31,29 +28,17 @@
* @author Glen Stampoultzis (glens at apache.org)
*/
-public class TestUnitsRecord
- extends TestCase
-{
+public final class TestUnitsRecord extends TestCase {
byte[] data = new byte[] {
(byte)0x00, (byte)0x00
};
- public TestUnitsRecord(String name)
- {
- super(name);
- }
-
- public void testLoad()
- throws Exception
- {
+ public void testLoad() {
UnitsRecord record = new UnitsRecord(new TestcaseRecordInputStream((short)0x1001, (short)data.length, data));
assertEquals( 0, record.getUnits());
-
assertEquals( 6, record.getRecordSize() );
-
- record.validateSid((short)0x1001);
}
public void testStore()
Modified: poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestValueRangeRecord.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestValueRangeRecord.java?rev=700359&r1=700358&r2=700359&view=diff
==============================================================================
--- poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestValueRangeRecord.java (original)
+++ poi/branches/ooxml/src/testcases/org/apache/poi/hssf/record/TestValueRangeRecord.java Mon Sep 29 23:42:27 2008
@@ -1,4 +1,3 @@
-
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -15,8 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-
-
package org.apache.poi.hssf.record;
@@ -31,9 +28,7 @@
*
* @author Glen Stampoultzis (glens at apache.org)
*/
-public class TestValueRangeRecord
- extends TestCase
-{
+public final class TestValueRangeRecord extends TestCase {
byte[] data = new byte[] {
(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00, // min axis value
(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00, // max axis value
@@ -43,14 +38,7 @@
(byte)0x1F,(byte)0x01 // options
};
- public TestValueRangeRecord(String name)
- {
- super(name);
- }
-
- public void testLoad()
- throws Exception
- {
+ public void testLoad() {
ValueRangeRecord record = new ValueRangeRecord(new TestcaseRecordInputStream((short)0x101f, (short)data.length, data));
assertEquals( 0.0, record.getMinimumAxisValue(), 0.001);
@@ -70,8 +58,6 @@
assertEquals( true, record.isReserved() );
assertEquals( 42+4, record.getRecordSize() );
-
- record.validateSid((short)0x101f);
}
public void testStore()
Modified: poi/branches/ooxml/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java?rev=700359&r1=700358&r2=700359&view=diff
==============================================================================
--- poi/branches/ooxml/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java (original)
+++ poi/branches/ooxml/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java Mon Sep 29 23:42:27 2008
@@ -892,4 +892,23 @@
//TODO: check shapeId in the cloned sheet
}
+
+ /**
+ * POI now (Sep 2008) allows sheet names longer than 31 chars (for other apps besides Excel).
+ * Since Excel silently truncates to 31, make sure that POI enforces uniqueness on the first
+ * 31 chars.
+ */
+ public void testLongSheetNames() {
+ HSSFWorkbook wb = new HSSFWorkbook();
+ final String SAME_PREFIX = "A123456789B123456789C123456789"; // 30 chars
+
+ wb.createSheet(SAME_PREFIX + "Dxxxx");
+ try {
+ wb.createSheet(SAME_PREFIX + "Dyyyy"); // identical up to the 32nd char
+ throw new AssertionFailedError("Expected exception not thrown");
+ } catch (IllegalArgumentException e) {
+ assertEquals("The workbook already contains a sheet of this name", e.getMessage());
+ }
+ wb.createSheet(SAME_PREFIX + "Exxxx"); // OK - differs in the 31st char
+ }
}
Modified: poi/branches/ooxml/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFWorkbook.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFWorkbook.java?rev=700359&r1=700358&r2=700359&view=diff
==============================================================================
--- poi/branches/ooxml/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFWorkbook.java (original)
+++ poi/branches/ooxml/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFWorkbook.java Mon Sep 29 23:42:27 2008
@@ -498,18 +498,12 @@
public BadlyBehavedRecord() {
//
}
- protected void fillFields(RecordInputStream in) {
- throw new RuntimeException("Should not be called");
- }
public short getSid() {
return 0x777;
}
public int serialize(int offset, byte[] data) {
return 4;
}
- protected void validateSid(short id) {
- throw new RuntimeException("Should not be called");
- }
public int getRecordSize() {
return 8;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org