Author: tfmorris
Date: 2010-04-13 10:18:29-0700
New Revision: 18250

Modified:
   
trunk/src/argouml-app/tests/org/argouml/persistence/TestProfileConfigurationFilePersister.java

Log:
Use standard UML profile rather than reloading

Modified: 
trunk/src/argouml-app/tests/org/argouml/persistence/TestProfileConfigurationFilePersister.java
Url: 
http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/tests/org/argouml/persistence/TestProfileConfigurationFilePersister.java?view=diff&pathrev=18250&r1=18249&r2=18250
==============================================================================
--- 
trunk/src/argouml-app/tests/org/argouml/persistence/TestProfileConfigurationFilePersister.java
      (original)
+++ 
trunk/src/argouml-app/tests/org/argouml/persistence/TestProfileConfigurationFilePersister.java
      2010-04-13 10:18:29-0700
@@ -1,6 +1,6 @@
 /* $Id$
  *****************************************************************************
- * Copyright (c) 2009 Contributors - see below
+ * Copyright (c) 2009,2010 Contributors - see below
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -8,6 +8,7 @@
  *
  * Contributors:
  *    euluis
+ *    Tom Morris
  *****************************************************************************
  *
  * Some portions of this file was previously release using the BSD License:
@@ -60,12 +61,10 @@
 import org.argouml.model.Model;
 import org.argouml.model.UmlException;
 import org.argouml.model.XmiWriter;
-import org.argouml.profile.CoreProfileReference;
 import org.argouml.profile.FileModelLoader;
 import org.argouml.profile.Profile;
 import org.argouml.profile.ProfileException;
-import org.argouml.profile.ProfileModelLoader;
-import org.argouml.profile.ResourceModelLoader;
+import org.argouml.profile.ProfileFacade;
 import org.argouml.profile.UserProfileReference;
 import org.argouml.profile.init.InitProfileSubsystem;
 import org.argouml.profile.internal.ProfileUML;
@@ -86,6 +85,12 @@
         new InitProfileSubsystem().init();
     }
 
+    @Override
+    protected void tearDown() throws Exception {
+        ProfileFacade.reset();
+        super.tearDown();
+    }
+    
     /**
      * Tests whether XmiWriterMDRImpl fails to write a profile 
      * (i.e., the file will contain no model) previously loaded from a file.
@@ -101,10 +106,8 @@
         throws ProfileException, FileNotFoundException, IOException, 
         UmlException {
         
-        ProfileModelLoader loader = new ResourceModelLoader();
-        Collection models = loader.loadModel(
-                new CoreProfileReference("default-uml14.xmi"));
-        Object umlModel = models.iterator().next();
+        Object umlModel = ProfileFacade.getManager().getUMLProfile()
+                .getProfilePackages().iterator().next();
         final String umlModelName = Model.getFacade().getName(umlModel);
         assertNotNull(umlModelName);
         File tempFile = File.createTempFile(umlModelName, ".xmi");

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

To unsubscribe from this discussion, e-mail: 
[[email protected]].

Reply via email to