aboutsummaryrefslogtreecommitdiffstats
path: root/src/scratchpad/testcases
diff options
context:
space:
mode:
authorNick Burch <nick@apache.org>2010-01-07 16:47:09 +0000
committerNick Burch <nick@apache.org>2010-01-07 16:47:09 +0000
commit8b89688ddb2c098177e578ef653dd906964e1e11 (patch)
tree658333786c68b6540fdaf27e22d1a7afa370285b /src/scratchpad/testcases
parent41994b053f940a3ee9e8d682c49628b3a71ccf7b (diff)
downloadpoi-8b89688ddb2c098177e578ef653dd906964e1e11.tar.gz
poi-8b89688ddb2c098177e578ef653dd906964e1e11.zip
Shuffle where some of the HSMF tests live to better match package names, and stub out a few more tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@896923 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/scratchpad/testcases')
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hsmf/AllHSMFTests.java9
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hsmf/TestBlankFileRead.java (renamed from src/scratchpad/testcases/org/apache/poi/hsmf/model/TestBlankFileRead.java)2
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hsmf/TestFileWithAttachmentsRead.java (renamed from src/scratchpad/testcases/org/apache/poi/hsmf/model/TestFileWithAttachmentsRead.java)2
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hsmf/TestOutlook30FileRead.java (renamed from src/scratchpad/testcases/org/apache/poi/hsmf/model/TestOutlook30FileRead.java)2
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hsmf/TestSimpleFileRead.java (renamed from src/scratchpad/testcases/org/apache/poi/hsmf/model/TestSimpleFileRead.java)2
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hsmf/datatypes/TestChunkData.java (renamed from src/scratchpad/testcases/org/apache/poi/hsmf/model/TestChunkData.java)2
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hsmf/datatypes/TestTypes.java (renamed from src/scratchpad/testcases/org/apache/poi/hsmf/model/TestTypes.java)2
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hsmf/parsers/TestPOIFSChunkParser.java56
8 files changed, 69 insertions, 8 deletions
diff --git a/src/scratchpad/testcases/org/apache/poi/hsmf/AllHSMFTests.java b/src/scratchpad/testcases/org/apache/poi/hsmf/AllHSMFTests.java
index 81daab2f23..260b658fce 100644
--- a/src/scratchpad/testcases/org/apache/poi/hsmf/AllHSMFTests.java
+++ b/src/scratchpad/testcases/org/apache/poi/hsmf/AllHSMFTests.java
@@ -20,7 +20,8 @@ package org.apache.poi.hsmf;
import junit.framework.Test;
import junit.framework.TestSuite;
-import org.apache.poi.hsmf.model.*;
+import org.apache.poi.hsmf.datatypes.*;
+import org.apache.poi.hsmf.parsers.*;
public final class AllHSMFTests {
@@ -29,9 +30,13 @@ public final class AllHSMFTests {
suite.addTestSuite(TestBlankFileRead.class);
suite.addTestSuite(TestSimpleFileRead.class);
suite.addTestSuite(TestOutlook30FileRead.class);
- suite.addTestSuite(TestChunkData.class);
suite.addTestSuite(TestFileWithAttachmentsRead.class);
+
+ suite.addTestSuite(TestChunkData.class);
+ suite.addTestSuite(TestTypes.class);
+ suite.addTestSuite(TestPOIFSChunkParser.class);
+
return suite;
}
}
diff --git a/src/scratchpad/testcases/org/apache/poi/hsmf/model/TestBlankFileRead.java b/src/scratchpad/testcases/org/apache/poi/hsmf/TestBlankFileRead.java
index fb21c5e86e..430c1b8e7a 100644
--- a/src/scratchpad/testcases/org/apache/poi/hsmf/model/TestBlankFileRead.java
+++ b/src/scratchpad/testcases/org/apache/poi/hsmf/TestBlankFileRead.java
@@ -15,7 +15,7 @@
limitations under the License.
==================================================================== */
-package org.apache.poi.hsmf.model;
+package org.apache.poi.hsmf;
import java.io.IOException;
diff --git a/src/scratchpad/testcases/org/apache/poi/hsmf/model/TestFileWithAttachmentsRead.java b/src/scratchpad/testcases/org/apache/poi/hsmf/TestFileWithAttachmentsRead.java
index 8762ef415c..c3fcda741f 100644
--- a/src/scratchpad/testcases/org/apache/poi/hsmf/model/TestFileWithAttachmentsRead.java
+++ b/src/scratchpad/testcases/org/apache/poi/hsmf/TestFileWithAttachmentsRead.java
@@ -15,7 +15,7 @@
limitations under the License.
==================================================================== */
-package org.apache.poi.hsmf.model;
+package org.apache.poi.hsmf;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
diff --git a/src/scratchpad/testcases/org/apache/poi/hsmf/model/TestOutlook30FileRead.java b/src/scratchpad/testcases/org/apache/poi/hsmf/TestOutlook30FileRead.java
index 12cc44c42b..113a214eb0 100644
--- a/src/scratchpad/testcases/org/apache/poi/hsmf/model/TestOutlook30FileRead.java
+++ b/src/scratchpad/testcases/org/apache/poi/hsmf/TestOutlook30FileRead.java
@@ -15,7 +15,7 @@
limitations under the License.
==================================================================== */
-package org.apache.poi.hsmf.model;
+package org.apache.poi.hsmf;
import java.io.IOException;
diff --git a/src/scratchpad/testcases/org/apache/poi/hsmf/model/TestSimpleFileRead.java b/src/scratchpad/testcases/org/apache/poi/hsmf/TestSimpleFileRead.java
index 672d94e8ff..3f261f4d8f 100644
--- a/src/scratchpad/testcases/org/apache/poi/hsmf/model/TestSimpleFileRead.java
+++ b/src/scratchpad/testcases/org/apache/poi/hsmf/TestSimpleFileRead.java
@@ -15,7 +15,7 @@
limitations under the License.
==================================================================== */
-package org.apache.poi.hsmf.model;
+package org.apache.poi.hsmf;
import java.io.IOException;
diff --git a/src/scratchpad/testcases/org/apache/poi/hsmf/model/TestChunkData.java b/src/scratchpad/testcases/org/apache/poi/hsmf/datatypes/TestChunkData.java
index 6a9fae44e2..39440d13b6 100644
--- a/src/scratchpad/testcases/org/apache/poi/hsmf/model/TestChunkData.java
+++ b/src/scratchpad/testcases/org/apache/poi/hsmf/datatypes/TestChunkData.java
@@ -15,7 +15,7 @@
limitations under the License.
==================================================================== */
-package org.apache.poi.hsmf.model;
+package org.apache.poi.hsmf.datatypes;
import org.apache.poi.hsmf.datatypes.Chunk;
import org.apache.poi.hsmf.datatypes.Chunks;
diff --git a/src/scratchpad/testcases/org/apache/poi/hsmf/model/TestTypes.java b/src/scratchpad/testcases/org/apache/poi/hsmf/datatypes/TestTypes.java
index 2b99af5309..0a2de38ac3 100644
--- a/src/scratchpad/testcases/org/apache/poi/hsmf/model/TestTypes.java
+++ b/src/scratchpad/testcases/org/apache/poi/hsmf/datatypes/TestTypes.java
@@ -15,7 +15,7 @@
limitations under the License.
==================================================================== */
-package org.apache.poi.hsmf.model;
+package org.apache.poi.hsmf.datatypes;
import org.apache.poi.hsmf.datatypes.Types;
diff --git a/src/scratchpad/testcases/org/apache/poi/hsmf/parsers/TestPOIFSChunkParser.java b/src/scratchpad/testcases/org/apache/poi/hsmf/parsers/TestPOIFSChunkParser.java
new file mode 100644
index 0000000000..06bc5f9e30
--- /dev/null
+++ b/src/scratchpad/testcases/org/apache/poi/hsmf/parsers/TestPOIFSChunkParser.java
@@ -0,0 +1,56 @@
+/* ====================================================================
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+==================================================================== */
+
+package org.apache.poi.hsmf.parsers;
+
+import java.io.FileInputStream;
+import java.io.IOException;
+
+import org.apache.poi.poifs.filesystem.POIFSFileSystem;
+import org.apache.poi.POIDataSamples;
+
+import junit.framework.TestCase;
+
+/**
+ * Tests to verify that the chunk parser works properly
+ */
+public final class TestPOIFSChunkParser extends TestCase {
+ private POIDataSamples samples;
+
+ public TestPOIFSChunkParser() throws IOException {
+ samples = POIDataSamples.getHSMFInstance();
+ }
+
+ public void testFindsRecips() throws IOException {
+
+ }
+
+ public void testFindsAttachments() throws IOException {
+ POIFSFileSystem with = new POIFSFileSystem(
+ new FileInputStream(samples.getFile("attachment_test_msg.msg"))
+ );
+ POIFSFileSystem without = new POIFSFileSystem(
+ new FileInputStream(samples.getFile("simple_test_msg.msg"))
+ );
+
+ // Check details on the one with
+
+ // One with, from the top
+
+ // One without, from the top
+ }
+}