| org.apache.poi.hpsf.basic.TestWriteWellKnown
TestWriteWellKnown | public class TestWriteWellKnown extends TestCase (Code) | | Tests HPSF's high-level writing functionality for the well-known property
set "SummaryInformation" and "DocumentSummaryInformation".
author: Rainer Klute author: klute@rainer-klute.de since: 2006-02-01 version: $Id: TestWriteWellKnown.java 489730 2006-12-22 19:18:16Z bayard $ |
Method Summary | |
public static void | main(String[] args) | public void | setUp() | public void | testCustomerProperties() | public void | testGetCustomerProperties() | public void | testReadCustomPropertiesFromFiles() | public void | testReadDocumentSummaryInformation() This test method checks whether DocumentSummary information streams
can be read. | public void | testWriteWellKnown() This test method test the writing of properties in the well-known
property set streams "SummaryInformation" and
"DocumentSummaryInformation" by performing the following steps:
Read a test document doc1 into a POI filesystem.
Read the summary information stream and the document summary
information stream from the POI filesystem.
Write all properties supported by HPSF to the summary
information (e.g. |
TestWriteWellKnown | public TestWriteWellKnown(String name)(Code) | | Constructor
Parameters: name - the test case's name |
main | public static void main(String[] args) throws Throwable(Code) | | Runs the test cases stand-alone.
Parameters: args - The command-line parameters. throws: Throwable - if anything goes wrong. |
setUp | public void setUp()(Code) | | See Also: TestCase.setUp |
testCustomerProperties | public void testCustomerProperties()(Code) | | Tests basic custom property features.
|
testGetCustomerProperties | public void testGetCustomerProperties()(Code) | | Tests reading custom properties from a section including reading
custom properties which are not pure.
|
testReadCustomPropertiesFromFiles | public void testReadCustomPropertiesFromFiles() throws Throwable(Code) | | Tests the simplified custom properties by reading them from the
available test files.
throws: Throwable - if anything goes wrong. |
testWriteWellKnown | public void testWriteWellKnown() throws IOException, NoPropertySetStreamException, MarkUnsupportedException, UnexpectedPropertySetTypeException, WritingNotSupportedException(Code) | | This test method test the writing of properties in the well-known
property set streams "SummaryInformation" and
"DocumentSummaryInformation" by performing the following steps:
Read a test document doc1 into a POI filesystem.
Read the summary information stream and the document summary
information stream from the POI filesystem.
Write all properties supported by HPSF to the summary
information (e.g. author, edit date, application name) and to the
document summary information (e.g. company, manager).
Write the summary information stream and the document summary
information stream to the POI filesystem.
Write the POI filesystem to a (temporary) file doc2
and close the latter.
Open doc2 for reading and check summary information
and document summary information. All properties written before must be
found in the property streams of doc2 and have the correct
values.
Remove all properties supported by HPSF from the summary
information (e.g. author, edit date, application name) and from the
document summary information (e.g. company, manager).
Write the summary information stream and the document summary
information stream to the POI filesystem.
Write the POI filesystem to a (temporary) file doc3
and close the latter.
Open doc3 for reading and check summary information
and document summary information. All properties removed before must not
be found in the property streams of doc3.
throws: IOException - if some I/O error occurred. throws: MarkUnsupportedException - throws: NoPropertySetStreamException - throws: UnexpectedPropertySetTypeException - throws: WritingNotSupportedException - |
|
|