public void TestTikaAutodetect()
{
Tika tika = new Tika();
File xpsFile = new File("samples\\test1.xps");
if (!xpsFile.isFile())
throw new Exception(xpsFile.getName() + " does not exists.");
using (InputStream inputStream = new FileInputStream(xpsFile))
{
Metadata metadata = new Metadata();
string mimeType = tika.detect(inputStream, metadata);
Assert.AreEqual("application/x-tika-ooxml", mimeType);
inputStream.close();
}
}