@@ -0,0 +1,3280 @@
+/*%0A * Licensed to the Apache Software Foundation (ASF) under one or more%0A * contributor license agreements.  See the NOTICE file distributed with%0A * this work for additional information regarding copyright ownership.%0A * The ASF licenses this file to You under the Apache License, Version 2.0%0A * (the %22License%22); you may not use this file except in compliance with%0A * the License.  You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage org.apache.tika.parser.fork;%0A%0Aimport java.io.InputStream;%0A%0Aimport junit.framework.TestCase;%0A%0Aimport org.apache.tika.fork.ForkParser;%0Aimport org.apache.tika.metadata.Metadata;%0Aimport org.apache.tika.parser.ParseContext;%0Aimport org.apache.tika.sax.BodyContentHandler;%0Aimport org.xml.sax.ContentHandler;%0A%0A/**%0A * Test that the ForkParser correctly behaves when%0A *  wired in to the regular Parsers and their test data%0A */%0Apublic class ForkParserIntegrationTest extends TestCase %7B%0A    /**%0A     * Simple text parsing%0A     * TODO Fix this test so it passes%0A     */%0A    public void DISABLEDtestForkedTextParsing() throws Exception %7B%0A       final ForkParser parser = new ForkParser(%0A             ForkParserIntegrationTest.class.getClassLoader(),%0A             new ForkParser());%0A%0A       try %7B%0A          ContentHandler output = new BodyContentHandler();%0A          InputStream stream = ForkParserIntegrationTest.class.getResourceAsStream(%22testTXT.txt%22);%0A          ParseContext context = new ParseContext();%0A          parser.parse(stream, output, new Metadata(), context);%0A%0A          String content = output.toString();%0A          assertTrue(content.contains(%22Test d'indexation%22));%0A          assertTrue(content.contains(%22http://www.apache.org/%22));%0A       %7D finally %7B%0A          parser.close();%0A       %7D%0A    %7D%0A   %0A    /**%0A     * TIKA-808 - Ensure that parsing of our test PDFs work under%0A     *  the Fork Parser, to ensure that complex parsing behaves%0A     * TODO Fix this test so it passes%0A     */%0A    public void DISABLEDtestForkedPDFParsing() throws Exception %7B%0A       final ForkParser parser = new ForkParser(%0A             ForkParserIntegrationTest.class.getClassLoader(),%0A             new ForkParser());%0A       %0A       try %7B%0A          ContentHandler output = new BodyContentHandler();%0A          InputStream stream = ForkParserIntegrationTest.class.getResourceAsStream(%22testPDF.pdf%22);%0A          ParseContext context = new ParseContext();%0A          parser.parse(stream, output, new Metadata(), context);%0A          %0A          String content = output.toString();%0A          assertTrue(content.contains(%22Apache Tika%22));%0A          assertTrue(content.contains(%22Tika - Content Analysis Toolkit%22));%0A          assertTrue(content.contains(%22incubator%22));%0A          assertTrue(content.contains(%22Apache Software Foundation%22));%0A      %7D finally %7B%0A          parser.close();%0A      %7D%0A    %7D%0A    %0A    public void testDUMMY() %7B%0A       // To avoid warnings about no tests while others are disabled%0A    %7D%0A%7D%0A

Add disabled tests for TIKA-808 (parser needs fixing so that tests can pass)