svn commit: r14317 - trunk/src/app/tests/org/argouml/kernel/TestProjectWithProfiles.java

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: euluis
Date: 2008-04-09 17:21:30-0700
New Revision: 14317

Modified:
   trunk/src/app/tests/org/argouml/kernel/TestProjectWithProfiles.java

Log:
issue 4946: now this fails as expected - the model and profile sub-systems must be reinitialized to make this test work.

Modified: trunk/src/app/tests/org/argouml/kernel/TestProjectWithProfiles.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/app/tests/org/argouml/kernel/TestProjectWithProfiles.java?view=diff&rev=14317&p1=trunk/src/app/tests/org/argouml/kernel/TestProjectWithProfiles.java&p2=trunk/src/app/tests/org/argouml/kernel/TestProjectWithProfiles.java&r1=14316&r2=14317
==============================================================================
--- trunk/src/app/tests/org/argouml/kernel/TestProjectWithProfiles.java	(original)
+++ trunk/src/app/tests/org/argouml/kernel/TestProjectWithProfiles.java	2008-04-09 17:21:30-0700
@@ -86,6 +86,10 @@
         super.tearDown();
     }
 
+    /**
+     * Basic test that a new project contains a {@link ProfileConfiguration} 
+     * and that this contains at least the UML profile.
+     */
     public void testCreatedProjectContainsProfileConfiguration() {
         Project project = ProjectManager.getManager().makeEmptyProject();
         ProfileConfiguration profileConfiguration = 
@@ -287,6 +291,8 @@
      *   <li>remove the directory where the user defined profile was stored in 
      *   order to test the handling of opening a zargo without the user defined
      *   profile</li>
+     *   <li>initialize the model and profile subsystems to simulate a fresh 
+     *   ArgoUML session</li>
      *   <li>load the project and assert that the model element that depends on 
      *   the profile is consistent</li>
      * </ol>
@@ -333,10 +339,14 @@
         // remove the user defined profile and the directory where it is
         profileManager.removeProfile(userDefinedProfile);
         profileManager.removeSearchPathDirectory(testCaseDir.getAbsolutePath());
+        // initialize the model and profile subsystems to simulate a fresh 
+        // ArgoUML session
+        InitializeModel.initializeMDR();
+        new InitProfileSubsystem().init();
         // load the project
-        // TODO: the following now does not throw since we the nre reference 
-        // resolving scheme, the model sub-system caches the system ID 
-        // references and resolves it on its own without the help of the 
+        // TODO: the following now does not throw since we implemented the 
+        // reference resolving scheme, the model sub-system caches the system 
+        // ID references and resolves it on its own without the help of the 
         // project.
         project = persister.doLoad(file);
         project.postLoad();
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.