Revision 370503cf
Added by Niels Hoffmann almost 13 years ago
cdmlib-commons/src/test/java/eu/etaxonomy/cdm/common/UriUtilsTest.java | ||
---|---|---|
1 | 1 |
package eu.etaxonomy.cdm.common; |
2 | 2 |
|
3 |
import static org.junit.Assert.*; |
|
4 |
|
|
3 |
import java.io.IOException; |
|
5 | 4 |
import java.net.MalformedURLException; |
6 | 5 |
import java.net.URI; |
7 | 6 |
import java.net.URISyntaxException; |
... | ... | |
11 | 10 |
|
12 | 11 |
import junit.framework.Assert; |
13 | 12 |
|
13 |
import org.apache.http.HttpException; |
|
14 | 14 |
import org.apache.http.NameValuePair; |
15 |
import org.apache.http.client.ClientProtocolException; |
|
15 | 16 |
import org.apache.http.message.BasicNameValuePair; |
16 | 17 |
import org.apache.log4j.Logger; |
17 | 18 |
import org.junit.Before; |
... | ... | |
54 | 55 |
} |
55 | 56 |
} |
56 | 57 |
|
58 |
@Test |
|
59 |
public void testGetResourceLength() throws ClientProtocolException, IOException, HttpException{ |
|
60 |
URI uri = URI.create("http://dev.e-taxonomy.eu/trac_htdocs/logo_edit.png"); |
|
61 |
Assert.assertEquals(9143, UriUtils.getResourceLength(uri, null)); |
|
62 |
} |
|
63 |
|
|
57 | 64 |
@Test |
58 | 65 |
public void testIsInternetAvailable() { |
59 | 66 |
URI firstUri = URI.create("http://www.gmx.de/"); |
Also available in: Unified diff
Refactored MediaMetaData and family. Renamed it to MediaInfo. API is now less confusing and more consistent.