svn commit: r18507 - trunk/src/argouml-app/tests/org/argouml/model/TestModelFacade3.java

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: bobtarling
Date: 2010-07-11 16:12:26-0700
New Revision: 18507

Modified:
   trunk/src/argouml-app/tests/org/argouml/model/TestModelFacade3.java

Log:
Allow MDR to throw NotImplementedException on UML2 methods

Modified: trunk/src/argouml-app/tests/org/argouml/model/TestModelFacade3.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/tests/org/argouml/model/TestModelFacade3.java?view=diff&pathrev=18507&r1=18506&r2=18507
==============================================================================
--- trunk/src/argouml-app/tests/org/argouml/model/TestModelFacade3.java	(original)
+++ trunk/src/argouml-app/tests/org/argouml/model/TestModelFacade3.java	2010-07-11 16:12:26-0700
@@ -171,18 +171,15 @@
                     + " does not deliver an IllegalArgumentException");
         } catch (InvocationTargetException e) {
             if (e.getTargetException() instanceof IllegalArgumentException 
-                    || e.getTargetException() instanceof ClassCastException) {
+                    || e.getTargetException() instanceof ClassCastException
+                    || e.getTargetException() instanceof NotImplementedException) {
                 return;
             }
             fail("Test failed for " + methodToTest.toString()
                     + " because of: "
                     + e.getTargetException());
         } catch (NotImplementedException e) {
-            // OK for UML 2.x, error for anything else
-            String version = Model.getFacade().getUmlVersion();
-            if (!version.startsWith("2.")) {
-                fail("Unexpected NotImplementedException");
-            }
+            // If method not supported ignore failure
         } catch (Exception e) {
             fail("Test failed for " + methodToTest.toString()
                     + " because of: " + e.toString());

------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=2632060

To unsubscribe from this discussion, e-mail: [[email protected]].
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.