From c0e47ed015288b1c37a624448494f7a457095b57 Mon Sep 17 00:00:00 2001 From: Nick Burch Date: Sat, 22 Mar 2008 17:03:27 +0000 Subject: [PATCH] New version of openxml4j, which supports reading from InputStreams. Enable WorkbookFactory test for this git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@640015 13f79535-47bb-0310-9956-ffa450edef68 --- build.xml | 4 ++-- .../testcases/org/apache/poi/ss/TestWorkbookFactory.java | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/build.xml b/build.xml index 30ce0be36..e8ebdf496 100644 --- a/build.xml +++ b/build.xml @@ -147,8 +147,8 @@ under the License. - - + + diff --git a/src/ooxml/testcases/org/apache/poi/ss/TestWorkbookFactory.java b/src/ooxml/testcases/org/apache/poi/ss/TestWorkbookFactory.java index 43b7f7ced..789d3206c 100644 --- a/src/ooxml/testcases/org/apache/poi/ss/TestWorkbookFactory.java +++ b/src/ooxml/testcases/org/apache/poi/ss/TestWorkbookFactory.java @@ -70,9 +70,11 @@ public class TestWorkbookFactory extends TestCase { } /** - * TODO - fix openxml4j to support input stream + * Creates the appropriate kind of Workbook, but + * checking the mime magic at the start of the + * InputStream, then creating what's required. */ - public void DISABLEDtestCreateGeneric() throws Exception { + public void testCreateGeneric() throws Exception { Workbook wb; // InputStream -> either @@ -86,7 +88,7 @@ public class TestWorkbookFactory extends TestCase { new FileInputStream(xlsx) ); assertNotNull(wb); - assertTrue(wb instanceof HSSFWorkbook); + assertTrue(wb instanceof XSSFWorkbook); try { wb = WorkbookFactory.create(