svn commit: r14318 - trunk/src/model-mdr: . tests/org/argouml/model/mdr

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: euluis
Date: 2008-04-10 16:09:45-0700
New Revision: 14318

Modified:
   trunk/src/model-mdr/build.xml
   trunk/src/model-mdr/tests/org/argouml/model/mdr/TestMDRModelImplementationCreate.java

Log:
fixing failing test case in Ant build

Modified: trunk/src/model-mdr/build.xml
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/model-mdr/build.xml?view=diff&rev=14318&p1=trunk/src/model-mdr/build.xml&p2=trunk/src/model-mdr/build.xml&r1=14317&r2=14318
==============================================================================
--- trunk/src/model-mdr/build.xml	(original)
+++ trunk/src/model-mdr/build.xml	2008-04-10 16:09:45-0700
@@ -292,6 +292,9 @@
       <fileset dir="tests">
         <include name="**/*.lcf"/>
       </fileset>
+      <fileset dir="tests">
+        <include name="testmodels/*.xmi"/>
+      </fileset>
     </copy>
         
   </target>

Modified: trunk/src/model-mdr/tests/org/argouml/model/mdr/TestMDRModelImplementationCreate.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/model-mdr/tests/org/argouml/model/mdr/TestMDRModelImplementationCreate.java?view=diff&rev=14318&p1=trunk/src/model-mdr/tests/org/argouml/model/mdr/TestMDRModelImplementationCreate.java&p2=trunk/src/model-mdr/tests/org/argouml/model/mdr/TestMDRModelImplementationCreate.java&r1=14317&r2=14318
==============================================================================
--- trunk/src/model-mdr/tests/org/argouml/model/mdr/TestMDRModelImplementationCreate.java	(original)
+++ trunk/src/model-mdr/tests/org/argouml/model/mdr/TestMDRModelImplementationCreate.java	2008-04-10 16:09:45-0700
@@ -27,6 +27,7 @@
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileNotFoundException;
+import java.net.URL;
 import java.util.Collection;
 
 import junit.framework.TestCase;
@@ -80,8 +81,10 @@
         assertEquals(m1, m);
         assertEquals(m2, m);
         XmiReader xmiReader = mi.getXmiReader();
-        String model = "tests/testmodels/test.xmi"; //!"ALittleBit.xmi";
-        File fileModel = new File(model);
+        URL modelUrl = getClass().getClassLoader().getResource(
+                "testmodels/test.xmi"); //!"ALittleBit.xmi";
+        assertNotNull(modelUrl);
+        File fileModel = new File(modelUrl.getPath());
         assertTrue(fileModel.exists());
         InputSource source = new InputSource(new FileInputStream(fileModel));
         //Model aLittleBit = (Model) xmiReader.parse(source);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.