CVS: junit/src/org/junit/runner Description.java, 1.1, 1.2
David Saff <[email protected]>
| Newsgroups | gmane.comp.java.junit.devel |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/junit/junit/src/org/junit/runner
In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv11474/src/org/junit/runner
Modified Files:
Description.java
Log Message:
Removed EmptyDescription, which was unneeded, and the only reason why Description had a protected constructor
Index: Description.java
===================================================================
RCS file: /cvsroot/junit/junit/src/org/junit/runner/Description.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- Description.java 21 Nov 2006 18:53:40 -0000 1.1
+++ Description.java 21 Feb 2007 14:44:00 -0000 1.2
@@ -41,10 +41,9 @@
public static Description createTestDescription(Class<?> clazz, String name) {
return new Description(String.format("%s(%s)", name, clazz.getName()));
}
-
+
/**
- * Create a generic <code>Description</code> that says there are tests in <code>testClass</code>.
- * This is used as a last resort when you cannot precisely describe the individual tests in the class.
+ * Create a <code>Description</code> named after <code>testClass</code>
* @param testClass A {@link Class} containing tests
* @return a <code>Description</code> of <code>testClass</code>
*/
@@ -52,11 +51,16 @@
return new Description(testClass.getName());
}
- public static Description TEST_MECHANISM = new Description("Test mechanism");
+ public static final Description EMPTY= new Description("No Tests");
+ public static final Description TEST_MECHANISM= new Description("Test mechanism");
+
private final ArrayList<Description> fChildren= new ArrayList<Description>();
private final String fDisplayName;
-
- //TODO we seem to be using the static factories exclusively
+
+ /**
+ * @deprecated (since 4.3) use the static factories (createTestDescription, createSuiteDescription) instead
+ */
+ @Deprecated
protected Description(final String displayName) {
fDisplayName= displayName;
}
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV