ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r463712 - in /ant/core/trunk: build.xml src/tests/junit/org/apache/tools/ant/types/EnumeratedAttributeTest.java src/tests/junit/org/apache/tools/ant/types/EnumeratedAttributeTest_Factory.java
Date Fri, 13 Oct 2006 15:40:28 GMT
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: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message