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
f0a8bc9281
commit
37b7f408a3
@ -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
Block a user