Search in sources :

Example 1 with OggDetector

use of org.gagravarr.tika.OggDetector in project tika by apache.

the class TikaDetectorsTest method testGetHTML.

@Test
public void testGetHTML() throws Exception {
    Response response = WebClient.create(endPoint + DETECTORS_PATH).type("text/html").accept("text/html").get();
    String text = getStringFromInputStream((InputStream) response.getEntity());
    assertContains("<h2>DefaultDetector</h2>", text);
    assertContains("Composite", text);
    assertContains("<h3>OggDetector", text);
    assertContains("<h3>POIFSContainerDetector", text);
    assertContains("<h3>MimeTypes", text);
    assertContains(OggDetector.class.getName(), text);
    assertContains(POIFSContainerDetector.class.getName(), text);
    assertContains(ZipContainerDetector.class.getName(), text);
    assertContains(MimeTypes.class.getName(), text);
}
Also used : Response(javax.ws.rs.core.Response) POIFSContainerDetector(org.apache.tika.parser.microsoft.POIFSContainerDetector) ZipContainerDetector(org.apache.tika.parser.pkg.ZipContainerDetector) OggDetector(org.gagravarr.tika.OggDetector) MimeTypes(org.apache.tika.mime.MimeTypes) Test(org.junit.Test)

Aggregations

Response (javax.ws.rs.core.Response)1 MimeTypes (org.apache.tika.mime.MimeTypes)1 POIFSContainerDetector (org.apache.tika.parser.microsoft.POIFSContainerDetector)1 ZipContainerDetector (org.apache.tika.parser.pkg.ZipContainerDetector)1 OggDetector (org.gagravarr.tika.OggDetector)1 Test (org.junit.Test)1