You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tika.apache.org by ta...@apache.org on 2016/06/03 19:55:39 UTC
[4/4] tika git commit: TIKA-1508 add some unit tests for
ParameterizedParserTest
TIKA-1508 add some unit tests for ParameterizedParserTest
Project: http://git-wip-us.apache.org/repos/asf/tika/repo
Commit: http://git-wip-us.apache.org/repos/asf/tika/commit/18ab8f91
Tree: http://git-wip-us.apache.org/repos/asf/tika/tree/18ab8f91
Diff: http://git-wip-us.apache.org/repos/asf/tika/diff/18ab8f91
Branch: refs/heads/TIKA-1508
Commit: 18ab8f91f19b105270a107174afd64fe81d20f72
Parents: 49ddf6e
Author: tballison <ta...@mitre.org>
Authored: Fri Jun 3 15:55:24 2016 -0400
Committer: tballison <ta...@mitre.org>
Committed: Fri Jun 3 15:55:24 2016 -0400
----------------------------------------------------------------------
.../tika/parser/ConfigurableParserTest.java | 1 -
.../tika/parser/DummyParameterizedParser.java | 113 +++++++++++++++++
.../tika/parser/DummyParametrizedParser.java | 97 --------------
.../tika/parser/ParameterizedParserTest.java | 127 +++++++++++++++++++
.../tika/parser/ParametrizedParserTest.java | 67 ----------
.../tika/config/TIKA-1986-bad-parameters.xml | 26 ++++
.../apache/tika/config/TIKA-1986-bad-types.xml | 26 ++++
.../apache/tika/config/TIKA-1986-bad-values.xml | 26 ++++
.../tika/config/TIKA-1986-parameterized.xml | 38 ++++++
.../tika/config/TIKA-1986-parametrized.xml | 37 ------
.../tika/config/TIKA-1986-some-parameters.xml | 28 ++++
11 files changed, 384 insertions(+), 202 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tika/blob/18ab8f91/tika-core/src/test/java/org/apache/tika/parser/ConfigurableParserTest.java
----------------------------------------------------------------------
diff --git a/tika-core/src/test/java/org/apache/tika/parser/ConfigurableParserTest.java b/tika-core/src/test/java/org/apache/tika/parser/ConfigurableParserTest.java
index c059626..dcf188d 100644
--- a/tika-core/src/test/java/org/apache/tika/parser/ConfigurableParserTest.java
+++ b/tika-core/src/test/java/org/apache/tika/parser/ConfigurableParserTest.java
@@ -27,7 +27,6 @@ import java.math.BigInteger;
import java.net.URI;
import java.net.URL;
import java.util.HashMap;
-import java.util.HashSet;
import java.util.Map;
public class ConfigurableParserTest {
http://git-wip-us.apache.org/repos/asf/tika/blob/18ab8f91/tika-core/src/test/java/org/apache/tika/parser/DummyParameterizedParser.java
----------------------------------------------------------------------
diff --git a/tika-core/src/test/java/org/apache/tika/parser/DummyParameterizedParser.java b/tika-core/src/test/java/org/apache/tika/parser/DummyParameterizedParser.java
new file mode 100644
index 0000000..848b774
--- /dev/null
+++ b/tika-core/src/test/java/org/apache/tika/parser/DummyParameterizedParser.java
@@ -0,0 +1,113 @@
+/*
+ * 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.tika.parser;
+
+import org.apache.tika.config.Field;
+import org.apache.tika.exception.TikaException;
+import org.apache.tika.metadata.Metadata;
+import org.apache.tika.mime.MediaType;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.SAXException;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.math.BigInteger;
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.HashSet;
+import java.util.Set;
+
+import static org.osgi.util.measurement.Unit.s;
+
+/**
+ * A test Parsers to test {@link Field}
+ * @since Apache Tika 1.14
+ */
+public class DummyParameterizedParser extends AbstractParser
+ implements ConfigurableParser {
+
+ private static Set<MediaType> MIMES = new HashSet<>();
+ static {
+ MIMES.add(MediaType.TEXT_PLAIN);
+ MIMES.add(MediaType.TEXT_HTML);
+ MIMES.add(MediaType.APPLICATION_XML);
+ MIMES.add(MediaType.OCTET_STREAM);
+ }
+
+ @Field(name = "testparam") private String testParam = "init_string";
+ @Field private short xshort = -2;
+ @Field private int xint = -3;
+ @Field private long xlong = -4;
+ @Field(name = "xbigint") private BigInteger xbigInt;
+ @Field private float xfloat = -5.0f;
+ @Field private double xdouble = -6.0d;
+ @Field private boolean xbool = true;
+ @Field private URL xurl;
+ @Field private URI xuri;
+
+ @Field private String missing = "default";
+
+ private String inner = "inner";
+ private File xfile;
+
+ public DummyParameterizedParser() {
+ try {
+ xurl = new URL("http://tika.apache.org/url");
+ } catch (MalformedURLException e) {
+ throw new IllegalArgumentException(e);
+ }
+ try {
+ xuri = new URI("http://tika.apache.org/uri");
+ } catch (URISyntaxException e) {
+ throw new IllegalArgumentException(e);
+ }
+ }
+ @Field
+ public void setXfile(File xfile){
+ this.xfile = xfile;
+ }
+
+ @Override
+ public Set<MediaType> getSupportedTypes(ParseContext context) {
+
+ return MIMES;
+ }
+
+ @Override
+ public void parse(InputStream stream, ContentHandler handler,
+ Metadata metadata, ParseContext context)
+ throws IOException, SAXException, TikaException {
+
+ metadata.add("testparam", testParam);
+ metadata.add("xshort", xshort + "");
+ metadata.add("xint", xint + "");
+ metadata.add("xlong", xlong + "");
+ metadata.add("xbigint", xbigInt + "");
+ metadata.add("xfloat", xfloat + "");
+ metadata.add("xdouble", xdouble + "");
+ metadata.add("xbool", xbool + "");
+ metadata.add("xuri", xuri + "");
+ metadata.add("xurl", xurl + "");
+ metadata.add("xfile", xfile + "");
+
+ metadata.add("inner", inner + "");
+ metadata.add("missing", missing + "");
+ }
+}
http://git-wip-us.apache.org/repos/asf/tika/blob/18ab8f91/tika-core/src/test/java/org/apache/tika/parser/DummyParametrizedParser.java
----------------------------------------------------------------------
diff --git a/tika-core/src/test/java/org/apache/tika/parser/DummyParametrizedParser.java b/tika-core/src/test/java/org/apache/tika/parser/DummyParametrizedParser.java
deleted file mode 100644
index 383a80b..0000000
--- a/tika-core/src/test/java/org/apache/tika/parser/DummyParametrizedParser.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * 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.tika.parser;
-
-import org.apache.tika.config.Field;
-import org.apache.tika.exception.TikaException;
-import org.apache.tika.metadata.Metadata;
-import org.apache.tika.mime.MediaType;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.SAXException;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.math.BigInteger;
-import java.net.URI;
-import java.net.URL;
-import java.util.HashSet;
-import java.util.Set;
-
-/**
- * A test Parsers to test {@link Field}
- * @since Apache Tika 1.14
- */
-public class DummyParametrizedParser extends AbstractParser
- implements ConfigurableParser {
-
- private static Set<MediaType> MIMES = new HashSet<>();
- static {
- MIMES.add(MediaType.TEXT_PLAIN);
- MIMES.add(MediaType.TEXT_HTML);
- MIMES.add(MediaType.APPLICATION_XML);
- MIMES.add(MediaType.OCTET_STREAM);
- }
-
- @Field(name = "testparam") private String testParam;
- @Field private short xshort;
- @Field private int xint;
- @Field private long xlong;
- @Field(name = "xbigint") private BigInteger xbigInt;
- @Field private float xfloat;
- @Field private double xdouble;
- @Field private boolean xbool;
- @Field private URL xurl;
- @Field private URI xuri;
-
- @Field private String missing = "default";
-
- private String inner = "inner";
- private File xfile;
-
- @Field
- public void setXfile(File xfile){
- this.xfile = xfile;
- }
-
- @Override
- public Set<MediaType> getSupportedTypes(ParseContext context) {
-
- return MIMES;
- }
-
- @Override
- public void parse(InputStream stream, ContentHandler handler,
- Metadata metadata, ParseContext context)
- throws IOException, SAXException, TikaException {
-
- metadata.add("testparam", testParam);
- metadata.add("xshort", xshort + "");
- metadata.add("xint", xint + "");
- metadata.add("xlong", xlong + "");
- metadata.add("xbigint", xbigInt + "");
- metadata.add("xfloat", xfloat + "");
- metadata.add("xdouble", xdouble + "");
- metadata.add("xbool", xbool + "");
- metadata.add("xuri", xuri + "");
- metadata.add("xurl", xurl + "");
- metadata.add("xfile", xfile + "");
-
- metadata.add("inner", inner + "");
- metadata.add("missing", missing + "");
- }
-}
http://git-wip-us.apache.org/repos/asf/tika/blob/18ab8f91/tika-core/src/test/java/org/apache/tika/parser/ParameterizedParserTest.java
----------------------------------------------------------------------
diff --git a/tika-core/src/test/java/org/apache/tika/parser/ParameterizedParserTest.java b/tika-core/src/test/java/org/apache/tika/parser/ParameterizedParserTest.java
new file mode 100644
index 0000000..e0c3b53
--- /dev/null
+++ b/tika-core/src/test/java/org/apache/tika/parser/ParameterizedParserTest.java
@@ -0,0 +1,127 @@
+/*
+ * 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.tika.parser;
+
+import org.apache.tika.Tika;
+import org.apache.tika.config.TikaConfig;
+import org.apache.tika.exception.TikaConfigException;
+import org.apache.tika.exception.TikaException;
+import org.apache.tika.metadata.Metadata;
+import org.junit.Assert;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.xml.sax.SAXException;
+
+import java.io.IOException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+public class ParameterizedParserTest {
+
+ private static final Map<String, String> expcted = new HashMap<String, String>() {
+ {
+ put("testparam", "testparamval");
+ put("xshort", "1000");
+ put("xint", "999999999");
+ put("xlong", "9999999999999");
+ put("xbigint", "99999999999999999999999999999999999999999999999");
+ put("xfloat", "10.2");
+ put("xbool", "true");
+ put("xdouble", "4.6");
+ put("xurl", "http://apache.org");
+ put("xfile", "somefile");
+ put("xuri", "tika://customuri?param=value");
+
+ put("inner", "inner");
+ put("missing", "default");
+ }
+ };
+
+
+ @Test
+ public void testConfigurableParserTypes() throws Exception {
+ Metadata md = getMetadata("TIKA-1986-parameterized.xml");
+ for (Map.Entry<String, String> entry : expcted.entrySet()) {
+ assertEquals("mismatch for " + entry.getKey(), entry.getValue(), md.get(entry.getKey()));
+ }
+ }
+
+ @Test
+ public void testSomeParams() throws Exception {
+ //test that a parameterized parser can read a config file
+ //with only some changes to the initial values
+ Metadata md = getMetadata("TIKA-1986-some-parameters.xml");
+ assertEquals("-6.0", md.get("xdouble"));
+ assertEquals("testparamval", md.get("testparam"));
+ assertEquals("true", md.get("xbool"));
+ }
+
+ @Test
+ @Ignore("can we get this to work, somehow?")
+ public void testBadParam() throws Exception {
+ try {
+ Metadata m = getMetadata("TIKA-1986-bad-parameters.xml");
+ fail("should have thrown exception");
+ } catch (TikaException e) {
+
+ }
+ }
+
+ @Test
+ public void testBadValue() throws Exception {
+ boolean ex = false;
+ try {
+ Metadata m = getMetadata("TIKA-1986-bad-values.xml");
+ fail("should have thrown exception");
+ } catch (TikaConfigException e) {
+ ex = true;
+ }
+ assertTrue("No TikaConfigException", ex);
+ }
+
+ @Test
+ public void testBadType() throws Exception {
+ //TODO: should this be a TikaConfigException instead of Runtime?
+ boolean ex = false;
+ try {
+ Metadata m = getMetadata("TIKA-1986-bad-types.xml");
+ fail("should have thrown exception");
+ } catch (RuntimeException e) {
+ ex = true;
+ }
+ assertTrue("No RuntimeException", ex);
+ }
+
+ //TODO later -- add a test for a parser that isn't configurable
+ //but that has params in the config file
+
+ private Metadata getMetadata(String name) throws TikaException, IOException, SAXException {
+ URL url = this.getClass().getResource("/org/apache/tika/config/"+name);
+ assertNotNull("couldn't find: "+name, url);
+ TikaConfig tikaConfig = new TikaConfig(url);
+ Tika tika = new Tika(tikaConfig);
+ Metadata metadata = new Metadata();
+ tika.parse(url.openStream(), metadata);
+ return metadata;
+ }
+}
http://git-wip-us.apache.org/repos/asf/tika/blob/18ab8f91/tika-core/src/test/java/org/apache/tika/parser/ParametrizedParserTest.java
----------------------------------------------------------------------
diff --git a/tika-core/src/test/java/org/apache/tika/parser/ParametrizedParserTest.java b/tika-core/src/test/java/org/apache/tika/parser/ParametrizedParserTest.java
deleted file mode 100644
index 290f819..0000000
--- a/tika-core/src/test/java/org/apache/tika/parser/ParametrizedParserTest.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * 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.tika.parser;
-
-import org.apache.tika.Tika;
-import org.apache.tika.config.TikaConfig;
-import org.apache.tika.metadata.Metadata;
-import org.junit.Assert;
-import org.junit.Test;
-
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
-
-public class ParametrizedParserTest {
-
- private static final String TIKA_CFG_FILE = "org/apache/tika/config/TIKA-1986-parametrized.xml";
- private static final Map<String, String> expcted = new HashMap<String, String>() {
- {
- put("testparam", "testparamval");
- put("xshort", "1000");
- put("xint", "999999999");
- put("xlong", "9999999999999");
- put("xbigint", "99999999999999999999999999999999999999999999999");
- put("xfloat", "10.2");
- put("xbool", "true");
- put("xdouble", "4.6");
- put("xurl", "http://apache.org");
- put("xfile", "/");
- put("xuri", "tika://customuri?param=value");
-
- put("inner", "inner");
- put("missing", "default");
- }
- };
-
-
- @Test
- public void testConfigurableParserTypes() throws Exception {
- URL configFileUrl = getClass().getClassLoader().getResource(TIKA_CFG_FILE);
- assert configFileUrl != null;
- TikaConfig config = new TikaConfig(configFileUrl);
- Tika tika = new Tika(config);
- Metadata md = new Metadata();
- tika.parse(configFileUrl.openStream(), md);
-
- for (Map.Entry<String, String> entry : expcted.entrySet()) {
- Assert.assertEquals("mismatch for " + entry.getKey(), entry.getValue(), md.get(entry.getKey()));
- }
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/tika/blob/18ab8f91/tika-core/src/test/resources/org/apache/tika/config/TIKA-1986-bad-parameters.xml
----------------------------------------------------------------------
diff --git a/tika-core/src/test/resources/org/apache/tika/config/TIKA-1986-bad-parameters.xml b/tika-core/src/test/resources/org/apache/tika/config/TIKA-1986-bad-parameters.xml
new file mode 100644
index 0000000..bc83cb5
--- /dev/null
+++ b/tika-core/src/test/resources/org/apache/tika/config/TIKA-1986-bad-parameters.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<properties>
+ <parsers>
+ <parser class="org.apache.tika.parser.DummyParameterizedParser">
+ <params>
+ <param name="zippidity_doo_dah" type="string">testparamval</param>
+ </params>
+ </parser>
+ </parsers>
+</properties>
http://git-wip-us.apache.org/repos/asf/tika/blob/18ab8f91/tika-core/src/test/resources/org/apache/tika/config/TIKA-1986-bad-types.xml
----------------------------------------------------------------------
diff --git a/tika-core/src/test/resources/org/apache/tika/config/TIKA-1986-bad-types.xml b/tika-core/src/test/resources/org/apache/tika/config/TIKA-1986-bad-types.xml
new file mode 100644
index 0000000..690c902
--- /dev/null
+++ b/tika-core/src/test/resources/org/apache/tika/config/TIKA-1986-bad-types.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<properties>
+ <parsers>
+ <parser class="org.apache.tika.parser.DummyParameterizedParser">
+ <params>
+ <param name="xint" type="zippity">When in the course of human events</param>
+ </params>
+ </parser>
+ </parsers>
+</properties>
http://git-wip-us.apache.org/repos/asf/tika/blob/18ab8f91/tika-core/src/test/resources/org/apache/tika/config/TIKA-1986-bad-values.xml
----------------------------------------------------------------------
diff --git a/tika-core/src/test/resources/org/apache/tika/config/TIKA-1986-bad-values.xml b/tika-core/src/test/resources/org/apache/tika/config/TIKA-1986-bad-values.xml
new file mode 100644
index 0000000..5219142
--- /dev/null
+++ b/tika-core/src/test/resources/org/apache/tika/config/TIKA-1986-bad-values.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<properties>
+ <parsers>
+ <parser class="org.apache.tika.parser.DummyParameterizedParser">
+ <params>
+ <param name="xint" type="int">When in the course of human events</param>
+ </params>
+ </parser>
+ </parsers>
+</properties>
http://git-wip-us.apache.org/repos/asf/tika/blob/18ab8f91/tika-core/src/test/resources/org/apache/tika/config/TIKA-1986-parameterized.xml
----------------------------------------------------------------------
diff --git a/tika-core/src/test/resources/org/apache/tika/config/TIKA-1986-parameterized.xml b/tika-core/src/test/resources/org/apache/tika/config/TIKA-1986-parameterized.xml
new file mode 100644
index 0000000..1f3d46c
--- /dev/null
+++ b/tika-core/src/test/resources/org/apache/tika/config/TIKA-1986-parameterized.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<properties>
+ <parsers>
+ <parser class="org.apache.tika.parser.DummyParameterizedParser">
+ <params>
+ <param name="testparam" type="string">testparamval</param>
+ <param name="xshort" type="short">1000</param>
+ <param name="xint" type="int">999999999</param>
+ <param name="xlong" type="long">9999999999999</param>
+ <param name="xbigint" type="bigint">99999999999999999999999999999999999999999999999</param>
+ <param name="xfloat" type="float">10.2</param>
+ <param name="xbool" type="bool">true</param>
+ <param name="xdouble" type="double">4.6</param>
+ <param name="xurl" type="url">http://apache.org</param>
+ <!-- for cross platform testing, can't include / in file -->
+ <param name="xfile" type="file">somefile</param>
+ <param name="xuri" type="uri">tika://customuri?param=value</param>
+ </params>
+ </parser>
+
+ </parsers>
+</properties>
http://git-wip-us.apache.org/repos/asf/tika/blob/18ab8f91/tika-core/src/test/resources/org/apache/tika/config/TIKA-1986-parametrized.xml
----------------------------------------------------------------------
diff --git a/tika-core/src/test/resources/org/apache/tika/config/TIKA-1986-parametrized.xml b/tika-core/src/test/resources/org/apache/tika/config/TIKA-1986-parametrized.xml
deleted file mode 100644
index 6689a19..0000000
--- a/tika-core/src/test/resources/org/apache/tika/config/TIKA-1986-parametrized.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
--->
-<properties>
- <parsers>
- <parser class="org.apache.tika.parser.DummyParametrizedParser">
- <params>
- <param name="testparam" type="string">testparamval</param>
- <param name="xshort" type="short">1000</param>
- <param name="xint" type="int">999999999</param>
- <param name="xlong" type="long">9999999999999</param>
- <param name="xbigint" type="bigint">99999999999999999999999999999999999999999999999</param>
- <param name="xfloat" type="float">10.2</param>
- <param name="xbool" type="bool">true</param>
- <param name="xdouble" type="double">4.6</param>
- <param name="xurl" type="url">http://apache.org</param>
- <param name="xfile" type="file">/</param>
- <param name="xuri" type="uri">tika://customuri?param=value</param>
- </params>
- </parser>
-
- </parsers>
-</properties>
http://git-wip-us.apache.org/repos/asf/tika/blob/18ab8f91/tika-core/src/test/resources/org/apache/tika/config/TIKA-1986-some-parameters.xml
----------------------------------------------------------------------
diff --git a/tika-core/src/test/resources/org/apache/tika/config/TIKA-1986-some-parameters.xml b/tika-core/src/test/resources/org/apache/tika/config/TIKA-1986-some-parameters.xml
new file mode 100644
index 0000000..250d439
--- /dev/null
+++ b/tika-core/src/test/resources/org/apache/tika/config/TIKA-1986-some-parameters.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<properties>
+ <parsers>
+ <parser class="org.apache.tika.parser.DummyParameterizedParser">
+ <params>
+ <param name="testparam" type="string">testparamval</param>
+ <param name="testbool" type="bool">false</param>
+ </params>
+ </parser>
+
+ </parsers>
+</properties>