Author: tfmorris
Date: 2008-04-15 18:07:56-0700
New Revision: 14353
Modified:
trunk/src/app/tests/org/argouml/uml/reveng/TestJavaImportClass.java
trunk/src/app/tests/org/argouml/uml/reveng/TestJavaImportInterface.java
Log:
Add getPackageImports to tests
Modified: trunk/src/app/tests/org/argouml/uml/reveng/TestJavaImportClass.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/app/tests/org/argouml/uml/reveng/TestJavaImportClass.java?view=diff&rev=14353&p1=trunk/src/app/tests/org/argouml/uml/reveng/TestJavaImportClass.java&p2=trunk/src/app/tests/org/argouml/uml/reveng/TestJavaImportClass.java&r1=14352&r2=14353
==============================================================================
--- trunk/src/app/tests/org/argouml/uml/reveng/TestJavaImportClass.java (original)
+++ trunk/src/app/tests/org/argouml/uml/reveng/TestJavaImportClass.java 2008-04-15 18:07:56-0700
@@ -1,5 +1,5 @@
// $Id$
-// Copyright (c) 1996-2007 The Regents of the University of California. All
+// Copyright (c) 1996-2008 The Regents of the University of California. All
// Rights Reserved. Permission to use, copy, modify, and distribute this
// software and its documentation without fee, and without a written
// agreement is hereby granted, provided that the above copyright notice
@@ -48,8 +48,11 @@
* setUp method need not be changed).<p>
*/
public class TestJavaImportClass extends TestCase {
- /*
- * @see junit.framework.TestCase#TestCase(String)
+
+ /**
+ * Construct a test case with the given name to test import of a Java class.
+ *
+ * @param str name of the test case
*/
public TestJavaImportClass(String str) {
super(str);
@@ -147,6 +150,11 @@
}
}
assertNotNull("No import found.", permission);
+ assertTrue("isAPackageImport returned false for import/Permission",
+ Model.getFacade().isAPackageImport(permission));
+ assertEquals("getPackageImport() found different result than "
+ + "getClientDependencies", permission, Model.getCoreHelper()
+ .getPackageImports(component).iterator().next());
assertEquals("The import name is wrong.",
"TestClass.java -> Observer",
Model.getFacade().getName(permission));
Modified: trunk/src/app/tests/org/argouml/uml/reveng/TestJavaImportInterface.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/app/tests/org/argouml/uml/reveng/TestJavaImportInterface.java?view=diff&rev=14353&p1=trunk/src/app/tests/org/argouml/uml/reveng/TestJavaImportInterface.java&p2=trunk/src/app/tests/org/argouml/uml/reveng/TestJavaImportInterface.java&r1=14352&r2=14353
==============================================================================
--- trunk/src/app/tests/org/argouml/uml/reveng/TestJavaImportInterface.java (original)
+++ trunk/src/app/tests/org/argouml/uml/reveng/TestJavaImportInterface.java 2008-04-15 18:07:56-0700
@@ -1,5 +1,5 @@
// $Id$
-// Copyright (c) 1996-2007 The Regents of the University of California. All
+// Copyright (c) 1996-2008 The Regents of the University of California. All
// Rights Reserved. Permission to use, copy, modify, and distribute this
// software and its documentation without fee, and without a written
// agreement is hereby granted, provided that the above copyright notice
@@ -48,8 +48,12 @@
* setUp method need not be changed).<p>
*/
public class TestJavaImportInterface extends TestCase {
- /*
- * @see junit.framework.TestCase#TestCase(String)
+
+
+ /**
+ * Construct an import Java interface test with the given name.
+ *
+ * @param str name of the test case
*/
public TestJavaImportInterface(String str) {
super(str);
@@ -147,6 +151,12 @@
}
}
assertNotNull("No import found.", permission);
+ assertTrue("isAPackageImport returned false for import/Permission",
+ Model.getFacade().isAPackageImport(permission));
+ assertEquals("getPackageImport() found different result than "
+ + "getClientDependencies", permission, Model.getCoreHelper()
+ .getPackageImports(component).iterator().next());
+
assertEquals("The import name is wrong.",
"TestInterface.java -> Observer",
Model.getFacade().getName(permission));
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.