Methods Summary |
---|
public static void | main(java.lang.String[] ignored_args)main method to run the unit tests
System.out
.println("Testing org.apache.poi.poifs.storage.RawDataBlockList");
junit.textui.TestRunner.run(TestRawDataBlockList.class);
|
public void | testEmptyConstructor()Test creating an empty RawDataBlockList
new RawDataBlockList(new ByteArrayInputStream(new byte[ 0 ]));
|
public void | testNormalConstructor()Test creating a normal RawDataBlockList
byte[] data = new byte[ 2560 ];
for (int j = 0; j < 2560; j++)
{
data[ j ] = ( byte ) j;
}
new RawDataBlockList(new ByteArrayInputStream(data));
|
public void | testShortConstructor()Test creating a short RawDataBlockList
for (int k = 2049; k < 2560; k++)
{
byte[] data = new byte[ k ];
for (int j = 0; j < k; j++)
{
data[ j ] = ( byte ) j;
}
try
{
new RawDataBlockList(new ByteArrayInputStream(data));
fail("Should have thrown IOException creating short block");
}
catch (IOException ignored)
{
// as expected
}
}
|