public virtual void testGetMimeTypeFromURL() { Assert.IsNull(JDFFileSpec.getMimeTypeFromURL(null)); Assert.IsNull(JDFFileSpec.getMimeTypeFromURL("burp")); Assert.AreEqual("application/pdf", JDFFileSpec.getMimeTypeFromURL("file://a/b/./testtif.foo.PDF")); Assert.AreEqual("image/tiff", JDFFileSpec.getMimeTypeFromURL("http://a/b/./testtif.foo.tiff")); }
/// /// * <exception cref="FormatException"> </exception> /// private void setUpAutomatedInputRunList() { JDFRunList run = rl.addRun("file://host/data/test.ppml", 0, -1); Assert.AreEqual(JDFFileSpec.getMimeTypeFromURL(".ppml"), run.getLayoutElement().getFileSpec().getMimeType()); run.setDocs(new JDFIntegerRangeList("0~99")); rl.setResStatus(EnumResStatus.Available, true); }