From: Nick Burch Date: Thu, 21 Feb 2008 15:42:06 +0000 (+0000) Subject: Patch from Josh from bug #44437 - improved unit test for poifs X-Git-Tag: REL_3_0_3_BETA1~120 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=fdd81557dffcf136a141adac8000f3fa90d0c2d8;p=poi.git Patch from Josh from bug #44437 - improved unit test for poifs git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@629832 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/testcases/org/apache/poi/AllPOITests.java b/src/testcases/org/apache/poi/AllPOITests.java new file mode 100755 index 0000000000..191b719500 --- /dev/null +++ b/src/testcases/org/apache/poi/AllPOITests.java @@ -0,0 +1,44 @@ +/* ==================================================================== + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +==================================================================== */ + +package org.apache.poi; + +import org.apache.poi.ddf.AllPOIDDFTests; +import org.apache.poi.hpsf.basic.AllPOIHPSFBasicTests; +import org.apache.poi.hssf.HSSFTests; +import org.apache.poi.poifs.AllPOIFSTests; +import org.apache.poi.util.AllPOIUtilTests; + +import junit.framework.Test; +import junit.framework.TestSuite; +/** + * Root Test Suite for entire POI project. (Includes all sub-packages of org.apache.poi)
+ * + * @author Josh Micich + */ +public final class AllPOITests { + public static Test suite() { + TestSuite result = new TestSuite("Tests for org.apache.poi"); + result.addTestSuite(TestPOIDocumentMain.class); + result.addTest(AllPOIDDFTests.suite()); + result.addTest(AllPOIHPSFBasicTests.suite()); + result.addTest(HSSFTests.suite()); + result.addTest(AllPOIFSTests.suite()); + result.addTest(AllPOIUtilTests.suite()); + return result; + } +} diff --git a/src/testcases/org/apache/poi/ddf/AllPOIDDFTests.java b/src/testcases/org/apache/poi/ddf/AllPOIDDFTests.java new file mode 100755 index 0000000000..9b5fc0bfef --- /dev/null +++ b/src/testcases/org/apache/poi/ddf/AllPOIDDFTests.java @@ -0,0 +1,47 @@ +/* ==================================================================== + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +==================================================================== */ + +package org.apache.poi.ddf; + +import junit.framework.Test; +import junit.framework.TestSuite; +/** + * Tests for org.apache.poi.ddf
+ * + * @author Josh Micich + */ +public final class AllPOIDDFTests { + public static Test suite() { + TestSuite result = new TestSuite("Tests for org.apache.poi.ddf"); + result.addTestSuite(TestEscherBlipWMFRecord.class); + result.addTestSuite(TestEscherBoolProperty.class); + result.addTestSuite(TestEscherBSERecord.class); + result.addTestSuite(TestEscherChildAnchorRecord.class); + result.addTestSuite(TestEscherClientAnchorRecord.class); + result.addTestSuite(TestEscherClientDataRecord.class); + result.addTestSuite(TestEscherContainerRecord.class); + result.addTestSuite(TestEscherDggRecord.class); + result.addTestSuite(TestEscherDgRecord.class); + result.addTestSuite(TestEscherOptRecord.class); + result.addTestSuite(TestEscherPropertyFactory.class); + result.addTestSuite(TestEscherSpgrRecord.class); + result.addTestSuite(TestEscherSplitMenuColorsRecord.class); + result.addTestSuite(TestEscherSpRecord.class); + result.addTestSuite(TestUnknownEscherRecord.class); + return result; + } +} diff --git a/src/testcases/org/apache/poi/hpsf/basic/AllPOIHPSFBasicTests.java b/src/testcases/org/apache/poi/hpsf/basic/AllPOIHPSFBasicTests.java new file mode 100755 index 0000000000..5954c9ca5f --- /dev/null +++ b/src/testcases/org/apache/poi/hpsf/basic/AllPOIHPSFBasicTests.java @@ -0,0 +1,39 @@ +/* ==================================================================== + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +==================================================================== */ + +package org.apache.poi.hpsf.basic; + +import junit.framework.Test; +import junit.framework.TestSuite; +/** + * Test suite for org.apache.poi.hpsf.basic + * + * @author Josh Micich + */ +public final class AllPOIHPSFBasicTests { + public static Test suite() { + TestSuite result = new TestSuite("Tests for org.apache.poi.hpsf.basic"); + result.addTestSuite(TestBasic.class); + result.addTestSuite(TestClassID.class); + result.addTestSuite(TestEmptyProperties.class); + result.addTestSuite(TestMetaDataIPI.class); + result.addTestSuite(TestUnicode.class); + result.addTestSuite(TestWrite.class); + result.addTestSuite(TestWriteWellKnown.class); + return result; + } +} diff --git a/src/testcases/org/apache/poi/poifs/AllPOIFSTests.java b/src/testcases/org/apache/poi/poifs/AllPOIFSTests.java new file mode 100755 index 0000000000..e302f17917 --- /dev/null +++ b/src/testcases/org/apache/poi/poifs/AllPOIFSTests.java @@ -0,0 +1,41 @@ +/* ==================================================================== + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +==================================================================== */ + +package org.apache.poi.poifs; + +import junit.framework.Test; +import junit.framework.TestSuite; + +import org.apache.poi.poifs.eventfilesystem.TestPOIFSReaderRegistry; +import org.apache.poi.poifs.filesystem.AllPOIFSFileSystemTests; +import org.apache.poi.poifs.property.AllPOIFSPropertyTests; +import org.apache.poi.poifs.storage.AllPOIFSStorageTests; +/** + * Test suite for all sub-packages of org.apache.poi.poifs + * + * @author Josh Micich + */ +public final class AllPOIFSTests { + public static Test suite() { + TestSuite result = new TestSuite("Tests for org.apache.poi.poifs"); + result.addTestSuite(TestPOIFSReaderRegistry.class); + result.addTest(AllPOIFSFileSystemTests.suite()); + result.addTest(AllPOIFSPropertyTests.suite()); + result.addTest(AllPOIFSStorageTests.suite()); + return result; + } +} diff --git a/src/testcases/org/apache/poi/poifs/filesystem/AllPOIFSFileSystemTests.java b/src/testcases/org/apache/poi/poifs/filesystem/AllPOIFSFileSystemTests.java new file mode 100755 index 0000000000..2a0319afee --- /dev/null +++ b/src/testcases/org/apache/poi/poifs/filesystem/AllPOIFSFileSystemTests.java @@ -0,0 +1,44 @@ +/* ==================================================================== + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +==================================================================== */ + +package org.apache.poi.poifs.filesystem; + +import junit.framework.Test; +import junit.framework.TestSuite; + +/** + * Tests for org.apache.poi.poifs.filesystem
+ * + * @author Josh Micich + */ +public final class AllPOIFSFileSystemTests { + + public static Test suite() { + TestSuite result = new TestSuite("Tests for org.apache.poi.poifs.filesystem"); + result.addTestSuite(TestDirectoryNode.class); + result.addTestSuite(TestDocument.class); + result.addTestSuite(TestDocumentDescriptor.class); + result.addTestSuite(TestDocumentInputStream.class); + result.addTestSuite(TestDocumentNode.class); + result.addTestSuite(TestDocumentOutputStream.class); + result.addTestSuite(TestEmptyDocument.class); + result.addTestSuite(TestOffice2007XMLException.class); + result.addTestSuite(TestPOIFSDocumentPath.class); + result.addTestSuite(TestPropertySorter.class); + return result; + } +} diff --git a/src/testcases/org/apache/poi/poifs/property/AllPOIFSPropertyTests.java b/src/testcases/org/apache/poi/poifs/property/AllPOIFSPropertyTests.java new file mode 100755 index 0000000000..a5459ed76f --- /dev/null +++ b/src/testcases/org/apache/poi/poifs/property/AllPOIFSPropertyTests.java @@ -0,0 +1,22 @@ +package org.apache.poi.poifs.property; + +import junit.framework.Test; +import junit.framework.TestSuite; + +/** + * Tests for org.apache.poi.poifs.property
+ * + * @author Josh Micich + */ +public final class AllPOIFSPropertyTests { + + public static Test suite() { + TestSuite result = new TestSuite("Tests for org.apache.poi.poifs.property"); + result.addTestSuite(TestDirectoryProperty.class); + result.addTestSuite(TestDocumentProperty.class); + result.addTestSuite(TestPropertyFactory.class); + result.addTestSuite(TestPropertyTable.class); + result.addTestSuite(TestRootProperty.class); + return result; + } +} diff --git a/src/testcases/org/apache/poi/poifs/storage/AllPOIFSStorageTests.java b/src/testcases/org/apache/poi/poifs/storage/AllPOIFSStorageTests.java new file mode 100755 index 0000000000..8c15d389e3 --- /dev/null +++ b/src/testcases/org/apache/poi/poifs/storage/AllPOIFSStorageTests.java @@ -0,0 +1,47 @@ +/* ==================================================================== + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +==================================================================== */ + +package org.apache.poi.poifs.storage; + +import junit.framework.Test; +import junit.framework.TestSuite; +/** + * Tests for org.apache.poi.poifs.storage
+ * + * @author Josh Micich + */ +public final class AllPOIFSStorageTests { + + public static Test suite() { + TestSuite result = new TestSuite("Tests for org.apache.poi.poifs.storage"); + result.addTestSuite(TestBATBlock.class); + result.addTestSuite(TestBlockAllocationTableReader.class); + result.addTestSuite(TestBlockAllocationTableWriter.class); + result.addTestSuite(TestBlockListImpl.class); + result.addTestSuite(TestDocumentBlock.class); + result.addTestSuite(TestHeaderBlockReader.class); + result.addTestSuite(TestHeaderBlockWriter.class); + result.addTestSuite(TestPropertyBlock.class); + result.addTestSuite(TestRawDataBlock.class); + result.addTestSuite(TestRawDataBlockList.class); + result.addTestSuite(TestSmallBlockTableReader.class); + result.addTestSuite(TestSmallBlockTableWriter.class); + result.addTestSuite(TestSmallDocumentBlock.class); + result.addTestSuite(TestSmallDocumentBlockList.class); + return result; + } +} diff --git a/src/testcases/org/apache/poi/util/AllPOIUtilTests.java b/src/testcases/org/apache/poi/util/AllPOIUtilTests.java new file mode 100755 index 0000000000..bb6d382047 --- /dev/null +++ b/src/testcases/org/apache/poi/util/AllPOIUtilTests.java @@ -0,0 +1,51 @@ +/* ==================================================================== + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +==================================================================== */ + +package org.apache.poi.util; + +import junit.framework.Test; +import junit.framework.TestSuite; +/** + * Test suite for all sub-packages of org.apache.poi.util
+ * + * @author Josh Micich + */ +public final class AllPOIUtilTests { + + public static Test suite() { + TestSuite result = new TestSuite("Tests for org.apache.poi.util"); + result.addTestSuite(TestArrayUtil.class); + result.addTestSuite(TestBinaryTree.class); + result.addTestSuite(TestBitField.class); + result.addTestSuite(TestByteField.class); + result.addTestSuite(TestDoubleList2d.class); + result.addTestSuite(TestHexDump.class); + result.addTestSuite(TestIntegerField.class); + result.addTestSuite(TestIntList.class); + result.addTestSuite(TestIntList2d.class); + result.addTestSuite(TestList2d.class); + result.addTestSuite(TestLittleEndian.class); + result.addTestSuite(TestLongField.class); + result.addTestSuite(TestPOILogFactory.class); + result.addTestSuite(TestPOILogger.class); + result.addTestSuite(TestShortField.class); + result.addTestSuite(TestShortList.class); + result.addTestSuite(TestStringUtil.class); + result.addTestSuite(TestTempFile.class); + return result; + } +}