svn commit: r15325 - trunk/src/argouml-app/tests/org/argouml/kernel/TestProject.java
| Newsgroups | gmane.comp.lang.uml.argouml.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: mvw
Date: 2008-07-21 05:03:18-0700
New Revision: 15325
Modified:
trunk/src/argouml-app/tests/org/argouml/kernel/TestProject.java
Log:
Make this test also work when there is a space in the path name.
Modified: trunk/src/argouml-app/tests/org/argouml/kernel/TestProject.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/tests/org/argouml/kernel/TestProject.java?view=diff&rev=15325&p1=trunk/src/argouml-app/tests/org/argouml/kernel/TestProject.java&p2=trunk/src/argouml-app/tests/org/argouml/kernel/TestProject.java&r1=15324&r2=15325
==============================================================================
--- trunk/src/argouml-app/tests/org/argouml/kernel/TestProject.java (original)
+++ trunk/src/argouml-app/tests/org/argouml/kernel/TestProject.java 2008-07-21 05:03:18-0700
@@ -25,6 +25,8 @@
package org.argouml.kernel;
import java.io.File;
+import java.net.URI;
+import java.net.URISyntaxException;
import java.net.URL;
import java.util.Collection;
@@ -88,14 +90,17 @@
*
* @throws InterruptedException if there the project load was interrupted
* @throws OpenException if there was an error during project load
+ * @throws URISyntaxException when the URI can not be formed
*/
- public void testRemove() throws OpenException, InterruptedException {
+ public void testRemove() throws OpenException, InterruptedException,
+ URISyntaxException {
String name = "/testmodels/uml14/Alittlebitofeverything.zargo";
URL url = TestProject.class.getResource(name);
AbstractFilePersister persister =
PersistenceManager.getInstance().getPersisterFromFileName(name);
- String filename = url.getFile();
- Project p = persister.doLoad(new File(filename));
+
+ URI uri = url.toURI();
+ Project p = persister.doLoad(new File(uri));
p.remove();