Revision ec97a876
Added by Niels Hoffmann over 13 years ago
cdmlib-commons/src/test/java/eu/etaxonomy/cdm/common/MediaMetaDataTest.java | ||
---|---|---|
16 | 16 |
import java.net.MalformedURLException; |
17 | 17 |
import java.net.URL; |
18 | 18 |
|
19 |
import org.apache.http.HttpException; |
|
19 | 20 |
import org.apache.log4j.Logger; |
20 | 21 |
import org.junit.After; |
21 | 22 |
import org.junit.AfterClass; |
... | ... | |
68 | 69 |
} |
69 | 70 |
|
70 | 71 |
/********************* TESTS |
71 |
* @throws IOException ********************/ |
|
72 |
* @throws IOException |
|
73 |
* @throws HttpException ********************/ |
|
72 | 74 |
|
73 | 75 |
@Test |
74 |
public void readImageInfoFromFile() throws IOException { |
|
76 |
public void readImageInfoFromFile() throws IOException, HttpException {
|
|
75 | 77 |
File imageFile = new File("./src/test/resources/images/OregonScientificDS6639-DSC_0307-small.jpg"); |
76 | 78 |
MetaDataFactory metaFactory = MetaDataFactory.getInstance(); |
77 | 79 |
ImageMetaData imageMetaData = (ImageMetaData) metaFactory.readMediaData(imageFile.toURI(), MimeType.JPEG, 0); |
... | ... | |
85 | 87 |
} |
86 | 88 |
|
87 | 89 |
@Test |
88 |
public void readImageInfoFromUrl() throws IOException { |
|
90 |
public void readImageInfoFromUrl() throws IOException, HttpException {
|
|
89 | 91 |
try { |
90 | 92 |
|
91 | 93 |
//TODO make ready for windows |
Also available in: Unified diff
ImageMetadata is now using UriUtils