mirror of https://github.com/apache/poi.git
Fix unit test for Bug 50298 some more
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1516320 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
da0b4d1b3a
commit
cb6ca3554d
|
@ -922,10 +922,7 @@ public final class TestHSSFWorkbook extends BaseTestWorkbook {
|
|||
assertEquals("Did not have the expected size when writing the workbook: written: " + written + ", but expected: " + expected,
|
||||
expected, written);
|
||||
|
||||
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||
wb.write(out);
|
||||
|
||||
HSSFWorkbook read = new HSSFWorkbook(new ByteArrayInputStream(out.toByteArray()));
|
||||
HSSFWorkbook read = HSSFTestDataSamples.writeOutAndReadBack(wb);
|
||||
assertSheetOrder(read, "Invoice", "Invoice1", "Digest", "Deferred", "Received");
|
||||
}
|
||||
|
||||
|
@ -965,11 +962,8 @@ public final class TestHSSFWorkbook extends BaseTestWorkbook {
|
|||
assertEquals("Did not have the expected size when writing the workbook: written: " + written + ", but expected: " + expected,
|
||||
expected, written);
|
||||
|
||||
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||
wb.write(out);
|
||||
|
||||
HSSFWorkbook read = new HSSFWorkbook(new ByteArrayInputStream(out.toByteArray()));
|
||||
assertSheetOrder(wb, "Invoice", "Deferred", "Received", "Digest");
|
||||
HSSFWorkbook read = HSSFTestDataSamples.writeOutAndReadBack(wb);
|
||||
assertSheetOrder(read, "Invoice", "Deferred", "Received", "Digest");
|
||||
}
|
||||
|
||||
private void assertSheetOrder(HSSFWorkbook wb, String... sheets) {
|
||||
|
|
Loading…
Reference in New Issue