You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by sa...@apache.org on 2004/03/02 07:26:04 UTC
cvs commit: jakarta-poi/src/scratchpad/testcases/org/apache/poi/hwpf/model TestListTables.java
sackley 2004/03/01 22:26:04
Added: src/scratchpad/testcases/org/apache/poi/hwpf/model
TestListTables.java
Log:
latest changes
Revision Changes Path
1.1 jakarta-poi/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestListTables.java
Index: TestListTables.java
===================================================================
package org.apache.poi.hwpf.model;
import junit.framework.*;
import org.apache.poi.hwpf.*;
import org.apache.poi.hwpf.model.io.*;
import java.io.*;
import java.util.*;
public class TestListTables
extends HWPFTestCase
{
public TestListTables()
{
}
public void testReadWrite()
throws Exception
{
FileInformationBlock fib = _hWPFDocFixture._fib;
byte[] tableStream = _hWPFDocFixture._tableStream;
ListTables listTables = new ListTables(tableStream, fib.getFcPlcfLst(), fib.getFcPlfLfo());
HWPFFileSystem fileSys = new HWPFFileSystem();
HWPFOutputStream tableOut = fileSys.getStream("1Table");
listTables.writeListDataTo(tableOut);
int offset = tableOut.getOffset();
listTables.writeListOverridesTo(tableOut);
ListTables newTables = new ListTables(tableOut.toByteArray(), 0, offset);
assertEquals(listTables, newTables);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-dev-help@jakarta.apache.org