Return-Path:
Mailing-List: contact poi-dev-help@jakarta.apache.org; run by ezmlm
Delivered-To: mailing list poi-dev@jakarta.apache.org
Received: (qmail 38320 invoked by uid 500); 28 Jul 2003 16:45:40 -0000
Received: (qmail 38315 invoked from network); 28 Jul 2003 16:45:40 -0000
Received: from icarus.apache.org (208.185.179.13)
by daedalus.apache.org with SMTP; 28 Jul 2003 16:45:40 -0000
Received: (qmail 27672 invoked by uid 1458); 28 Jul 2003 16:45:39 -0000
Date: 28 Jul 2003 16:45:39 -0000
Message-ID: <20030728164539.27671.qmail@icarus.apache.org>
From: klute@apache.org
To: jakarta-poi-cvs@apache.org
Subject: cvs commit: jakarta-poi/src/testcases/org/apache/poi/hpsf/basic
TestEmptyProperties.java
X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N
Status: O
X-Status:
X-Keywords:
X-UID: 779
klute 2003/07/28 09:45:39
Modified: src/testcases/org/apache/poi/hpsf/basic Tag: REL_2_BRANCH
TestEmptyProperties.java
Log:
Test case fixed.
Revision Changes Path
No revision
No revision
1.1.2.3 +30 -8 jakarta-poi/src/testcases/org/apache/poi/hpsf/basic/TestEmptyProperties.java
Index: TestEmptyProperties.java
===================================================================
RCS file: /home/cvs/jakarta-poi/src/testcases/org/apache/poi/hpsf/basic/TestEmptyProperties.java,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -r1.1.2.2 -r1.1.2.3
--- TestEmptyProperties.java 28 Jul 2003 10:18:13 -0000 1.1.2.2
+++ TestEmptyProperties.java 28 Jul 2003 16:45:39 -0000 1.1.2.3
@@ -37,13 +37,20 @@
static final String[] POI_FILES = new String[]
{
- "SlideShow",
+ "PerfectOffice_MAIN",
"\005SummaryInformation",
- "PerfectOffice_MAIN"
+ "Main"
};
POIFile[] poiFiles;
+
+
+ /**
+ * Constructor
+ *
+ * @param name The name of the test case
+ */
public TestEmptyProperties(final String name)
{
super(name);
@@ -53,6 +60,10 @@
/**
* Read a the test file from the "data" directory.
+ *
+ * @exception FileNotFoundException if the file containing the test data
+ * does not exist
+ * @exception IOException if an I/O exception occurs
*/
public void setUp() throws FileNotFoundException, IOException
{
@@ -68,6 +79,8 @@
/**
* Checks the names of the files in the POI filesystem. They
* are expected to be in a certain order.
+ *
+ * @exception IOException if an I/O exception occurs
*/
public void testReadFiles() throws IOException
{
@@ -86,9 +99,11 @@
* property sets. In the latter cases a {@link
* NoPropertySetStreamException} will be thrown when trying to
* create a {@link PropertySet}.
+ *
+ * @exception IOException if an I/O exception occurs
*/
public void testCreatePropertySets() throws IOException
- {
+ {
Class[] expected = new Class[]
{
NoPropertySetStreamException.class,
@@ -126,10 +141,13 @@
* Tests the {@link PropertySet} methods. The test file has two
* property sets: the first one is a {@link SummaryInformation},
* the second one is a {@link DocumentSummaryInformation}.
+ *
+ * @exception IOException if an I/O exception occurs
+ * @exception HPSFException if an HPSF operation fails
*/
public void testPropertySetMethods() throws IOException, HPSFException
{
- byte[] b = poiFiles[2].getBytes();
+ byte[] b = poiFiles[1].getBytes();
PropertySet ps =
PropertySetFactory.create(new ByteArrayInputStream(b));
SummaryInformation s = (SummaryInformation) ps;
@@ -145,9 +163,9 @@
assertNull(s.getLastPrinted());
assertNull(s.getCreateDateTime());
assertNull(s.getLastSaveDateTime());
- assertEquals(s.getPageCount(),0);
- assertEquals(s.getWordCount(),0);
- assertEquals(s.getCharCount(),0);
+ assertEquals(s.getPageCount(), 0);
+ assertEquals(s.getWordCount(), 0);
+ assertEquals(s.getCharCount(), 0);
assertNull(s.getThumbnail());
assertNull(s.getApplicationName());
}
@@ -156,6 +174,10 @@
/**
* Runs the test cases stand-alone.
+ *
+ * @param args the command-line arguments (unused)
+ *
+ * @exception Throwable if any exception or error occurs
*/
public static void main(final String[] args) throws Throwable
{