Author: tfmorris
Date: 2008-07-30 12:08:23-0700
New Revision: 15411
Modified:
trunk/src/argouml-app/tests/org/argouml/persistence/TestZargoFilePersister.java
Log:
Issue 5245: Remove created projects at the end of each test so that they don't cause errors in stale notation listeners
Modified: trunk/src/argouml-app/tests/org/argouml/persistence/TestZargoFilePersister.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/tests/org/argouml/persistence/TestZargoFilePersister.java?view=diff&rev=15411&p1=trunk/src/argouml-app/tests/org/argouml/persistence/TestZargoFilePersister.java&p2=trunk/src/argouml-app/tests/org/argouml/persistence/TestZargoFilePersister.java&r1=15410&r2=15411
==============================================================================
--- trunk/src/argouml-app/tests/org/argouml/persistence/TestZargoFilePersister.java (original)
+++ trunk/src/argouml-app/tests/org/argouml/persistence/TestZargoFilePersister.java 2008-07-30 12:08:23-0700
@@ -120,7 +120,8 @@
* @throws Exception when e.g. the file is not found
*/
public void testDoLoadEmptyUml13() throws Exception {
- doLoad("/testmodels/uml13/Empty.zargo");
+ Project p = doLoad("/testmodels/uml13/Empty.zargo");
+ p.remove();
}
/**
@@ -129,7 +130,8 @@
* @throws Exception when e.g. the file is not found
*/
public void testDoLoadEmptyUml14() throws Exception {
- doLoad("/testmodels/uml14/EmptyProject024.zargo");
+ Project p = doLoad("/testmodels/uml14/EmptyProject024.zargo");
+ p.remove();
}
/**
@@ -138,7 +140,8 @@
* @throws Exception when e.g. the file is not found
*/
public void testDoLoadUml13() throws Exception {
- doLoad("/testmodels/uml13/Alittlebitofeverything.zargo");
+ Project p = doLoad("/testmodels/uml13/Alittlebitofeverything.zargo");
+ p.remove();
}
/**
@@ -147,8 +150,10 @@
* @throws Exception when e.g. the file is not found
*/
public void testDoLoadUml14() throws Exception {
- doLoad("/testmodels/uml14/Alittlebitofeverything.zargo");
- doLoad("/testmodels/uml14/SequenceDiagram.zargo");
+ Project p = doLoad("/testmodels/uml14/Alittlebitofeverything.zargo");
+ p.remove();
+ p = doLoad("/testmodels/uml14/SequenceDiagram.zargo");
+ p.remove();
}
/**
@@ -157,7 +162,8 @@
* @throws Exception when e.g. the file is not found
*/
public void testDoLoadUml14i18n() throws Exception {
- doLoad("/testmodels/uml14/i18n.zargo");
+ Project p = doLoad("/testmodels/uml14/i18n.zargo");
+ p.remove();
}
@@ -170,6 +176,7 @@
Project p = doLoad("/testmodels/uml14/Alittlebitofeverything.zargo");
ZargoFilePersister persister = new ZargoFilePersister();
persister.save(p, new File("Alittlebitofeverything2.zargo"));
+ p.remove();
}
/**
@@ -204,11 +211,11 @@
InterruptedException {
// Load a project which contains links to it
- doLoad("/testmodels/uml14/LinkedProfile.zargo");
+ Project p = doLoad("/testmodels/uml14/LinkedProfile.zargo");
// Make sure the contents match what we expect
final Facade f = Model.getFacade();
- Collection topElements = f.getRootElements();
+ Collection topElements = p.getRoots();
assertFalse("No top level elements", topElements.isEmpty());
for (Object element : topElements) {
if (f.isAClass(element)) {
@@ -222,6 +229,8 @@
f.getName(parent));
}
}
+
+ p.remove();
}
}
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.