You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by rd...@apache.org on 2002/09/26 23:20:53 UTC

cvs commit: jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/strategy TestHyphenatedNameMapper.java

rdonkin     2002/09/26 14:20:53

  Modified:    betwixt/src/test/org/apache/commons/betwixt/strategy
                        TestHyphenatedNameMapper.java
  Log:
  Added test case for issue reported by John Thorhaue that now seems to be fixed.
  
  Revision  Changes    Path
  1.3       +17 -0     jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/strategy/TestHyphenatedNameMapper.java
  
  Index: TestHyphenatedNameMapper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/strategy/TestHyphenatedNameMapper.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestHyphenatedNameMapper.java	11 Jun 2002 16:05:21 -0000	1.2
  +++ TestHyphenatedNameMapper.java	26 Sep 2002 21:20:52 -0000	1.3
  @@ -9,6 +9,10 @@
    */
   package org.apache.commons.betwixt.strategy;
   
  +import java.util.ArrayList;
  +
  +import org.apache.commons.betwixt.XMLIntrospector;
  +
   import junit.framework.Test;
   import junit.framework.TestCase;
   import junit.framework.TestSuite;
  @@ -59,5 +63,18 @@
           assertEquals("FOO__BAR__FOO__BAR", result);
   
        }
  +     
  +    
  +    public void testBeanWithAdd() throws Exception {	
  +        //
  +        // simple test this one
  +        // a problem was reported when introspecting classes with 'add' properties
  +        // when using the HyphenatedNameMapper
  +        // basically, the test is that no exception is thrown
  +        //
  +        XMLIntrospector introspector = new XMLIntrospector();
  +        introspector.setElementNameMapper(new HyphenatedNameMapper());
  +        introspector.introspect(new ArrayList());
  +    }
   }
   
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>