Преглед на файлове

Integration tests: Add writing out the document

This will cover some more functionality

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917174 13f79535-47bb-0310-9956-ffa450edef68
pull/625/head
Dominik Stadler преди 1 месец
родител
ревизия
8c101982e0
променени са 2 файла, в които са добавени 3 реда и са изтрити 0 реда
  1. 3
    0
      poi-integration/src/test/java/org/apache/poi/stress/XWPFFileHandler.java
  2. Двоични данни
      test-data/spreadsheet/stress.xls

+ 3
- 0
poi-integration/src/test/java/org/apache/poi/stress/XWPFFileHandler.java Целия файл

@@ -22,6 +22,7 @@ import java.io.FileInputStream;
import java.io.InputStream;
import java.util.Set;

import org.apache.commons.io.output.NullOutputStream;
import org.apache.poi.ooxml.POIXMLException;
import org.apache.poi.xwpf.usermodel.XWPFDocument;
import org.junit.jupiter.api.Test;
@@ -41,6 +42,8 @@ public class XWPFFileHandler extends AbstractFileHandler {
try (XWPFDocument doc = new XWPFDocument(stream)) {
new POIXMLDocumentHandler().handlePOIXMLDocument(doc);
POIXMLDocumentHandler.cursorRecursive(doc.getDocument());

doc.write(NullOutputStream.INSTANCE);
} catch (POIXMLException e) {
Exception cause = (Exception)e.getCause();
throw cause == null ? e : cause;

Двоични данни
test-data/spreadsheet/stress.xls Целия файл


Loading…
Отказ
Запис