use of com.dexels.navajo.document.types.Binary in project navajo by Dexels.
the class TestSwift method testNullMime.
@Test
@Ignore
public void testNullMime() throws IOException {
Map<String, String> meta = new HashMap<String, String>();
meta.put("aap", "noot");
URL u = new URL("https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png");
Binary b = new Binary(u, true);
osi.store(b);
// osi.set("test/factory",null, b, meta);
}
use of com.dexels.navajo.document.types.Binary in project navajo by Dexels.
the class TestBinary method testBinaryFromURL.
@Test
public void testBinaryFromURL() throws IOException {
URL u = new URL("https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png");
Binary b = new Binary(u, false);
Assert.assertTrue("", b.getLength() > 2000);
}
use of com.dexels.navajo.document.types.Binary in project navajo by Dexels.
the class TestBinary method testNonLazyBinary.
@Test
public void testNonLazyBinary() {
Binary b1 = new Binary(getClass().getResourceAsStream("binary1.txt"));
Assert.assertEquals(7, b1.getData().length);
}
use of com.dexels.navajo.document.types.Binary in project navajo by Dexels.
the class TestBinary method testUnresolvedBinary.
@Test
public void testUnresolvedBinary() throws IOException {
URL u = new URL("https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png");
Binary b = new Binary(u, true);
Assert.assertFalse(b.isResolved());
Assert.assertTrue("", b.getData().length > 2000);
Assert.assertTrue(b.isResolved());
}
use of com.dexels.navajo.document.types.Binary in project navajo by Dexels.
the class TestBinary method testMimeDetection1.
@Test
// Ignore until we find a proper fix for this problem...
@Ignore
public void testMimeDetection1() throws IOException {
// File-based test - no sandbox mode
NavajoFactory.getInstance().setSandboxMode(false);
URL url = this.getClass().getResource("doc1.doc");
Binary binaryx = new Binary(new File(url.getFile()));
Assert.assertEquals("application/msword", binaryx.guessContentType());
}
Aggregations