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/introspection test-bwbi-output-a.xml test-bwbi-output-g.xml TestXMLIntrospector.java test-bwbi-output.xml
Date Wed, 01 Jan 2003 21:41:13 GMT
rdonkin     2003/01/01 13:41:13

  Modified:    betwixt/src/test/org/apache/commons/betwixt/introspection
                        TestXMLIntrospector.java
  Added:       betwixt/src/test/org/apache/commons/betwixt/introspection
                        test-bwbi-output-a.xml test-bwbi-output-g.xml
  Removed:     betwixt/src/test/org/apache/commons/betwixt/introspection
                        test-bwbi-output.xml
  Log:
  Hopefully this will fix the problem with this unit test on unix platforms.
  
  Revision  Changes    Path
  1.3       +18 -9     jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/introspection/TestXMLIntrospector.java
  
  Index: TestXMLIntrospector.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/introspection/TestXMLIntrospector.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestXMLIntrospector.java	30 Dec 2002 22:45:05 -0000	1.2
  +++ TestXMLIntrospector.java	1 Jan 2003 21:41:13 -0000	1.3
  @@ -216,12 +216,13 @@
           assertEquals("Wrong number of elements", 2 , elementDescriptors.length);
   
           // order of properties isn't guarenteed 
  +        boolean alphaFirst = true;
           if ("alpha".equals(elementDescriptors[0].getPropertyName())) {
  -        
  +            
               assertEquals("Second element name", "gamma" , elementDescriptors[1].getPropertyName());
               
           } else {
  -        
  +            alphaFirst = false;
               assertEquals("First element name", "gamma" , elementDescriptors[0].getPropertyName());
               assertEquals("Second element name", "alpha" , elementDescriptors[1].getPropertyName());
           }
  @@ -233,9 +234,17 @@
           BeanWithBeanInfoBean bean = new BeanWithBeanInfoBean("alpha value","beta value","gamma
value");
           writer.write(bean);
           
  -        xmlAssertIsomorphicContent(
  -                    parseFile("src/test/org/apache/commons/betwixt/introspection/test-bwbi-output.xml"),
  +        if (alphaFirst) {
  +        
  +            xmlAssertIsomorphicContent(
  +                    parseFile("src/test/org/apache/commons/betwixt/introspection/test-bwbi-output-a.xml"),
                       parseString(out.toString()));
  +        
  +        } else {
  +            xmlAssertIsomorphicContent(
  +                    parseFile("src/test/org/apache/commons/betwixt/introspection/test-bwbi-output-g.xml"),
  +                    parseString(out.toString()));
  +        }
       }
   }
   
  
  
  
  1.1                  jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/introspection/test-bwbi-output-a.xml
  
  Index: test-bwbi-output-a.xml
  ===================================================================
  <?xml version='1.0'?>
  <BeanWithBeanInfoBean>
          <alpha>alpha value</alpha>
  	<gamma>gamma value</gamma>
  </BeanWithBeanInfoBean>
  
  
  1.1                  jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/introspection/test-bwbi-output-g.xml
  
  Index: test-bwbi-output-g.xml
  ===================================================================
  <?xml version='1.0'?>
  <BeanWithBeanInfoBean>
  	<gamma>gamma value</gamma>
  	<alpha>alpha value</alpha>
  </BeanWithBeanInfoBean>
  
  

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


Mime
View raw message