svn commit: r14066 - trunk/src/model-mdr/tests: org/argouml/model/mdr testmodels

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: euluis
Date: 2008-01-28 15:20:52-0800
New Revision: 14066

Added:
   trunk/src/model-mdr/tests/testmodels/test.xmi
Modified:
   trunk/src/model-mdr/tests/org/argouml/model/mdr/TestMDRModelImplementation.java
   trunk/src/model-mdr/tests/org/argouml/model/mdr/TestMDRModelImplementationCreate.java

Log:
Issue #4922: tests fixed, although maybe not in the most robust way.

Modified: trunk/src/model-mdr/tests/org/argouml/model/mdr/TestMDRModelImplementation.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/model-mdr/tests/org/argouml/model/mdr/TestMDRModelImplementation.java?view=diff&rev=14066&p1=trunk/src/model-mdr/tests/org/argouml/model/mdr/TestMDRModelImplementation.java&p2=trunk/src/model-mdr/tests/org/argouml/model/mdr/TestMDRModelImplementation.java&r1=14065&r2=14066
==============================================================================
--- trunk/src/model-mdr/tests/org/argouml/model/mdr/TestMDRModelImplementation.java	(original)
+++ trunk/src/model-mdr/tests/org/argouml/model/mdr/TestMDRModelImplementation.java	2008-01-28 15:20:52-0800
@@ -24,6 +24,8 @@
 
 package org.argouml.model.mdr;
 
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
 import java.io.OutputStream;
 import java.io.Writer;
 
@@ -293,10 +295,11 @@
 
     /**
      * @throws UmlException If an error occur
+     * @throws FileNotFoundException If the file isn't found
      */
-    public void testGetXmiWriter() throws UmlException {
+    public void testGetXmiWriter() throws UmlException, FileNotFoundException {
         assertNotNull(modelImplementation.getXmiWriter(
-                null, (OutputStream) null, null));
+                "dummyModel", new FileOutputStream("dummy.txt"), null));
     }
 }
 

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=14066&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=14065&r2=14066
==============================================================================
--- trunk/src/model-mdr/tests/org/argouml/model/mdr/TestMDRModelImplementationCreate.java	(original)
+++ trunk/src/model-mdr/tests/org/argouml/model/mdr/TestMDRModelImplementationCreate.java	2008-01-28 15:20:52-0800
@@ -80,7 +80,7 @@
         assertEquals(m1, m);
         assertEquals(m2, m);
         XmiReader xmiReader = mi.getXmiReader();
-        String model = "ALittleBit.xmi";
+        String model = "tests/testmodels/test.xmi";//!"ALittleBit.xmi";
         File fileModel = new File(model);
         assertTrue(fileModel.exists());
         InputSource source = new InputSource(new FileInputStream(fileModel));

Added: trunk/src/model-mdr/tests/testmodels/test.xmi
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/model-mdr/tests/testmodels/test.xmi?view=auto&rev=14066
==============================================================================
--- (empty file)
+++ trunk/src/model-mdr/tests/testmodels/test.xmi	2008-01-28 15:20:52-0800
@@ -0,0 +1,32 @@
+<?xml version = '1.0' encoding = 'UTF-8' ?>

+<XMI xmi.version = '1.2' xmlns:UML = 'org.omg.xmi.namespace.UML' timestamp = 'Tue Nov 27 23:30:13 GMT 2007'>

+  <XMI.header>    <XMI.documentation>
+      <XMI.exporter>ArgoUML (using Netbeans XMI Writer version 1.0)</XMI.exporter>
+      <XMI.exporterVersion>null(5) revised on $Date: 2007-05-12 07:08:08 +0100 (sáb, 12 Mai 2007) $ </XMI.exporterVersion>
+    </XMI.documentation>
+    <XMI.metamodel xmi.name="UML" xmi.version="1.4"/></XMI.header>

+  <XMI.content>

+    <UML:Model xmi.id = '10-0-1-2--900c58e:11683722cb1:-8000:0000000000000782'

+      name = 'untitledModel' isSpecification = 'false' isRoot = 'false' isLeaf = 'false'

+      isAbstract = 'false'>

+      <UML:Namespace.ownedElement>

+        <UML:Class xmi.id = '10-0-1-2--900c58e:11683722cb1:-8000:0000000000000783'

+          name = '' visibility = 'public' isSpecification = 'false' isRoot = 'false'

+          isLeaf = 'false' isAbstract = 'false' isActive = 'false'>

+          <UML:Classifier.feature>

+            <UML:Operation xmi.id = '10-0-1-2--900c58e:11683722cb1:-8000:0000000000000784'

+              name = 'newOperation' visibility = 'public' isSpecification = 'false' ownerScope = 'instance'

+              isQuery = 'false' concurrency = 'sequential' isRoot = 'false' isLeaf = 'false'

+              isAbstract = 'false'>

+              <UML:BehavioralFeature.parameter>

+                <UML:Parameter xmi.id = '10-0-1-2--900c58e:11683722cb1:-8000:0000000000000785'

+                  name = 'return' isSpecification = 'false' kind = 'return'>

+                </UML:Parameter>

+              </UML:BehavioralFeature.parameter>

+            </UML:Operation>

+          </UML:Classifier.feature>

+        </UML:Class>

+      </UML:Namespace.ownedElement>

+    </UML:Model>

+  </XMI.content>

+</XMI>
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.