commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1210647 - /commons/proper/digester/trunk/src/test/java/org/apache/commons/digester3/Digester153TestCase.java
Date Mon, 05 Dec 2011 21:29:00 GMT
Author: simonetripodi
Date: Mon Dec  5 21:29:00 2011
New Revision: 1210647

URL: http://svn.apache.org/viewvc?rev=1210647&view=rev
Log:
restored basicConstructorWithValuesNotFound() test

Modified:
    commons/proper/digester/trunk/src/test/java/org/apache/commons/digester3/Digester153TestCase.java

Modified: commons/proper/digester/trunk/src/test/java/org/apache/commons/digester3/Digester153TestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/digester/trunk/src/test/java/org/apache/commons/digester3/Digester153TestCase.java?rev=1210647&r1=1210646&r2=1210647&view=diff
==============================================================================
--- commons/proper/digester/trunk/src/test/java/org/apache/commons/digester3/Digester153TestCase.java
(original)
+++ commons/proper/digester/trunk/src/test/java/org/apache/commons/digester3/Digester153TestCase.java
Mon Dec  5 21:29:00 2011
@@ -21,6 +21,7 @@ package org.apache.commons.digester3;
 
 import static org.apache.commons.digester3.binder.DigesterLoader.newLoader;
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 
 import org.apache.commons.digester3.annotations.FromAnnotationsRuleModule;
@@ -151,23 +152,23 @@ public final class Digester153TestCase
         assertEquals( 9.99D, bean.getDoubleProperty(), 0 );
     }
 
-    /* @Test
+    @Test
     public void basicConstructorWithValuesNotFound()
         throws Exception
     {
         ObjectCreateRule createRule = new ObjectCreateRule( TestBean.class );
-        createRule.addConstructorArgument( "notfound1", boolean.class );
-        createRule.addConstructorArgument( "notfound2", double.class );
+        createRule.setConstructorArgumentTypes( boolean.class, double.class );
 
         Digester digester = new Digester();
         digester.addRule( "toplevel/bean", createRule );
+        digester.addCallParam( "toplevel/bean", 0, "notFound1" );
+        digester.addCallParam( "toplevel/bean", 1, "notFound2" );
 
         TestBean bean = digester.parse( getClass().getResourceAsStream( "BasicConstructor.xml"
) );
 
         assertFalse( bean.getBooleanProperty() );
         assertEquals( 0D, bean.getDoubleProperty(), 0 );
     }
-    */
 
     @Test( expected = SAXParseException.class )
     public void basicConstructorWithWrongParameters()



Mime
View raw message