Author: jhm
Date: Fri Oct 13 08:40:26 2006
New Revision: 463712
URL: http://svn.apache.org/viewvc?view=rev&rev=463712
Log:
"Move" test object to inner class.
Removed:
ant/core/trunk/src/tests/junit/org/apache/tools/ant/types/EnumeratedAttributeTest_Factory.java
Modified:
ant/core/trunk/build.xml
ant/core/trunk/src/tests/junit/org/apache/tools/ant/types/EnumeratedAttributeTest.java
Modified: ant/core/trunk/build.xml
URL:
http://svn.apache.org/viewvc/ant/core/trunk/build.xml?view=diff&rev=463712&r1=463711&r2=463712
==============================================================================
--- ant/core/trunk/build.xml (original)
+++ ant/core/trunk/build.xml Fri Oct 13 08:40:26 2006
@@ -1697,7 +1697,7 @@
if="junit.batch">
<property name="junit.includes" value="**/*Test*" />
- <property name="junit.excludes" value="**/*Test_*" />
+ <property name="junit.excludes" value="" />
<test-junit>
<formatter type="brief" usefile="false"/>
Modified:
ant/core/trunk/src/tests/junit/org/apache/tools/ant/types/EnumeratedAttributeTest.java
URL:
http://svn.apache.org/viewvc/ant/core/trunk/src/tests/junit/org/apache/tools/ant/types/EnumeratedAttributeTest.java?view=diff&rev=463712&r1=463711&r2=463712
==============================================================================
---
ant/core/trunk/src/tests/junit/org/apache/tools/ant/types/EnumeratedAttributeTest.java
(original)
+++
ant/core/trunk/src/tests/junit/org/apache/tools/ant/types/EnumeratedAttributeTest.java
Fri Oct 13 08:40:26 2006
@@ -48,14 +48,10 @@
}
public void testFactory() {
- EnumeratedAttributeTest_Factory ea1 =
(EnumeratedAttributeTest_Factory)EnumeratedAttribute.getInstance(
- EnumeratedAttributeTest_Factory.class,
- "one");
- assertEquals("Factory didnt set the right value.",
ea1.getValue(), "one");
+ Factory ea =
(Factory)EnumeratedAttribute.getInstance(Factory.class, "one");
+ assertEquals("Factory did not set the right value.",
ea.getValue(), "one");
try {
- EnumeratedAttributeTest_Factory ea2 =
(EnumeratedAttributeTest_Factory)EnumeratedAttribute.getInstance(
- EnumeratedAttributeTest_Factory.class,
- "illegal");
+ EnumeratedAttribute.getInstance(Factory.class, "illegal");
fail("Factory should fail when trying to set an illegal
value.");
} catch (BuildException be) {
// was expected
@@ -95,6 +91,12 @@
public String[] getValues() {
return null;
}
+ }
+
+ public static class Factory extends EnumeratedAttribute {
+ public String[] getValues() {
+ return new String[] { "one", "two", "three" };
+ }
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]