commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rdon...@apache.org
Subject cvs commit: jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/io/read TestReadContext.java
Date Tue, 27 Apr 2004 19:59:48 GMT
rdonkin     2004/04/27 12:59:48

  Modified:    betwixt/src/test/org/apache/commons/betwixt/io/read Tag:
                        REFACTORING-BRANCH_2004-01-13 TestReadContext.java
  Log:
  Added support for array property setters
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.1.2.5   +21 -5     jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/io/read/Attic/TestReadContext.java
  
  Index: TestReadContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/io/read/Attic/TestReadContext.java,v
  retrieving revision 1.1.2.4
  retrieving revision 1.1.2.5
  diff -u -r1.1.2.4 -r1.1.2.5
  --- TestReadContext.java	19 Apr 2004 21:31:13 -0000	1.1.2.4
  +++ TestReadContext.java	27 Apr 2004 19:59:48 -0000	1.1.2.5
  @@ -66,6 +66,7 @@
   
   import org.apache.commons.betwixt.AbstractTestCase;
   import org.apache.commons.betwixt.BindingConfiguration;
  +import org.apache.commons.betwixt.LibraryBeanWithArraySetter;
   
   /** 
    * Test harness for ReadContext
  @@ -178,6 +179,21 @@
           context.markClassMap(Integer.class);
           assertEquals("Top class", Integer.class, context.getLastMappedClass());
       }
  +    
  +    
  +    public void testNullElementNameMatchesAll() throws Exception {
  +        
  +        ReadContext context = new ReadContext(
  +                    new BindingConfiguration(), 
  +                    new ReadConfiguration()); 
  +                    
  +        context.pushElement("LibraryBeanWithArraySetter");   
  +        context.markClassMap(LibraryBeanWithArraySetter.class); 
  +        context.pushElement("books");
  +        context.pushElement("whatever");
  +        assertNotNull("Null name should match any new element", context.getCurrentDescriptor());
  +    }
  +    
       
   /* Sad to say that the method tested has had to be made private.
    * Maybe would be good to find a way to test the
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message