svn commit: r13802 - trunk/tests/org/argouml/kernel/TestProjectSettings.java

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: mvw
Date: 2007-11-20 06:40:29-0800
New Revision: 13802

Modified:
   trunk/tests/org/argouml/kernel/TestProjectSettings.java

Log:
Fix failing test - we cannot handle a case without a Notation, hence we need to initialise some.

Modified: trunk/tests/org/argouml/kernel/TestProjectSettings.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/tests/org/argouml/kernel/TestProjectSettings.java?view=diff&rev=13802&p1=trunk/tests/org/argouml/kernel/TestProjectSettings.java&p2=trunk/tests/org/argouml/kernel/TestProjectSettings.java&r1=13801&r2=13802
==============================================================================
--- trunk/tests/org/argouml/kernel/TestProjectSettings.java	(original)
+++ trunk/tests/org/argouml/kernel/TestProjectSettings.java	2007-11-20 06:40:29-0800
@@ -27,13 +27,16 @@
 import java.beans.PropertyChangeEvent;
 
 import junit.framework.TestCase;
-import org.argouml.model.InitializeModel;
 
 import org.argouml.application.events.ArgoEventPump;
 import org.argouml.application.events.ArgoNotationEvent;
 import org.argouml.application.events.ArgoNotationEventListener;
 import org.argouml.configuration.Configuration;
+import org.argouml.model.InitializeModel;
+import org.argouml.notation.InitNotation;
 import org.argouml.notation.Notation;
+import org.argouml.notation.providers.java.InitNotationJava;
+import org.argouml.notation.providers.uml.InitNotationUml;
 
 /**
  * Tests for the ProjectSettings.
@@ -272,7 +275,8 @@
                 ((String) pce.getNewValue()).equals("2"));
         
         rxdEvent = null;
-        p.getProjectSettings().setNotationLanguage("Java");
+        /* We initialised Java Notation, so let's activate it: */
+        assertTrue(p.getProjectSettings().setNotationLanguage("Java"));
         /* This assumes events are dispatched on the same thread. */
         assertTrue("Got no notation event", rxdEvent != null);
         pce = (PropertyChangeEvent) rxdEvent.getSource();
@@ -291,6 +295,9 @@
     protected void setUp() throws Exception {
         super.setUp();
         InitializeModel.initializeDefault();
+        (new InitNotation()).init();
+        (new InitNotationUml()).init();
+        (new InitNotationJava()).init();
         /* Needed for initialisations: */
         ProjectManager.getManager().getCurrentProject();
     }
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.