Revision de8249cf
Added by Andreas Müller over 3 years ago
cdmlib-io/src/test/java/eu/etaxonomy/cdm/io/dwca/in/DwcaImportIntegrationTest.java | ||
---|---|---|
11 | 11 |
import static org.junit.Assert.assertNotNull; |
12 | 12 |
|
13 | 13 |
import java.io.FileNotFoundException; |
14 |
import java.net.URI; |
|
15 | 14 |
import java.net.URISyntaxException; |
16 | 15 |
import java.net.URL; |
17 | 16 |
|
... | ... | |
23 | 22 |
import org.unitils.database.util.TransactionMode; |
24 | 23 |
import org.unitils.spring.annotation.SpringBeanByName; |
25 | 24 |
|
25 |
import eu.etaxonomy.cdm.common.URI; |
|
26 | 26 |
import eu.etaxonomy.cdm.io.common.CdmApplicationAwareDefaultImport; |
27 | 27 |
import eu.etaxonomy.cdm.io.common.events.LoggingIoObserver; |
28 | 28 |
import eu.etaxonomy.cdm.test.integration.CdmTransactionalIntegrationTest; |
... | ... | |
47 | 47 |
public void setUp() throws Exception { |
48 | 48 |
String inputFile = "/eu/etaxonomy/cdm/io/dwca/in/DwcaZipToStreamConverterTest-input.zip"; |
49 | 49 |
URL url = this.getClass().getResource(inputFile); |
50 |
uri = url.toURI();
|
|
50 |
uri = URI.fromUrl(url);
|
|
51 | 51 |
assertNotNull("URI for the test file '" + inputFile + "' does not exist", uri); |
52 | 52 |
try { |
53 |
configurator = DwcaImportConfigurator.NewInstance(url.toURI(), null);
|
|
53 |
configurator = DwcaImportConfigurator.NewInstance(URI.fromUrl(url), null);
|
|
54 | 54 |
configurator.addObserver(new LoggingIoObserver()); |
55 | 55 |
} catch (URISyntaxException e) { |
56 | 56 |
e.printStackTrace(); |
Also available in: Unified diff
ref #9114 add URI Wrapper and replace all java.net.URI occurrences by the wrapper in cdmlib