aboutsummaryrefslogtreecommitdiffstats
path: root/src/integrationtest
diff options
context:
space:
mode:
authorDominik Stadler <centic@apache.org>2017-06-09 12:49:01 +0000
committerDominik Stadler <centic@apache.org>2017-06-09 12:49:01 +0000
commit902124a5fd2aadbe4d106c4a4efd907769984a05 (patch)
tree2e4fdb3626c01ed16cb113c33c22d86f60614f96 /src/integrationtest
parent20ed0075e80fd3ed7534a768f3b0ec9f942497d6 (diff)
downloadpoi-902124a5fd2aadbe4d106c4a4efd907769984a05.tar.gz
poi-902124a5fd2aadbe4d106c4a4efd907769984a05.zip
Move one testcase with incorrect source location
remove some junit dependencies in example-code build: do not pass junit-jar to normal compile targets to avoid introducing it as dependency again Reformat code, fix warnings, ... git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1798202 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/integrationtest')
-rw-r--r--src/integrationtest/org/apache/poi/stress/HWPFFileHandler.java74
1 files changed, 37 insertions, 37 deletions
diff --git a/src/integrationtest/org/apache/poi/stress/HWPFFileHandler.java b/src/integrationtest/org/apache/poi/stress/HWPFFileHandler.java
index d4ec360062..13e198d169 100644
--- a/src/integrationtest/org/apache/poi/stress/HWPFFileHandler.java
+++ b/src/integrationtest/org/apache/poi/stress/HWPFFileHandler.java
@@ -27,47 +27,47 @@ import org.apache.poi.hwpf.extractor.WordExtractor;
import org.junit.Test;
public class HWPFFileHandler extends POIFSFileHandler {
- @Override
- public void handleFile(InputStream stream, String path) throws Exception {
- HWPFDocument doc = new HWPFDocument(stream);
- assertNotNull(doc.getBookmarks());
- assertNotNull(doc.getCharacterTable());
- assertNotNull(doc.getEndnotes());
-
- handlePOIDocument(doc);
- }
+ @Override
+ public void handleFile(InputStream stream, String path) throws Exception {
+ HWPFDocument doc = new HWPFDocument(stream);
+ assertNotNull(doc.getBookmarks());
+ assertNotNull(doc.getCharacterTable());
+ assertNotNull(doc.getEndnotes());
+
+ handlePOIDocument(doc);
+ }
- // a test-case to test this locally without executing the full TestAllFiles
- @Override
+ // a test-case to test this locally without executing the full TestAllFiles
+ @Override
@Test
- public void test() throws Exception {
+ public void test() throws Exception {
File file = new File("test-data/document/52117.doc");
InputStream stream = new FileInputStream(file);
- try {
- handleFile(stream, file.getPath());
- } finally {
- stream.close();
- }
-
- handleExtracting(file);
-
- stream = new FileInputStream(file);
- try {
- WordExtractor extractor = new WordExtractor(stream);
- try {
- assertNotNull(extractor.getText());
- } finally {
- extractor.close();
- }
- } finally {
- stream.close();
- }
- }
+ try {
+ handleFile(stream, file.getPath());
+ } finally {
+ stream.close();
+ }
+
+ handleExtracting(file);
+
+ stream = new FileInputStream(file);
+ try {
+ WordExtractor extractor = new WordExtractor(stream);
+ try {
+ assertNotNull(extractor.getText());
+ } finally {
+ extractor.close();
+ }
+ } finally {
+ stream.close();
+ }
+ }
- @Test
- public void testExtractingOld() throws Exception {
- File file = new File("test-data/document/52117.doc");
- handleExtracting(file);
- }
+ @Test
+ public void testExtractingOld() throws Exception {
+ File file = new File("test-data/document/52117.doc");
+ handleExtracting(file);
+ }
}