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 LoopBean.java TestBeanWriter.java
Date Wed, 06 Nov 2002 21:40:25 GMT
rdonkin     2002/11/06 13:40:25

  Modified:    betwixt/src/test/org/apache/commons/betwixt LoopBean.java
                        TestBeanWriter.java
  Log:
  Added some test cases
  
  Revision  Changes    Path
  1.2       +22 -1     jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/LoopBean.java
  
  Index: LoopBean.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/LoopBean.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- LoopBean.java	10 Jun 2002 17:53:32 -0000	1.1
  +++ LoopBean.java	6 Nov 2002 21:40:25 -0000	1.2
  @@ -97,7 +97,7 @@
           
           return root;
       }    
  -    
  +        
       public static final LoopBean createLoopExampleBean()
       {
           LoopBean root = new LoopBean("Root");
  @@ -113,6 +113,27 @@
           levelThree.setFriend(levelFour);
           levelFour.setFriend(levelFive);
           levelFive.setFriend(root);
  +        
  +        return root;
  +    }
  +    
  +    
  +    public static final LoopBean createIdOnlyLoopExampleBean()
  +    {
  +        LoopBean root = new LoopBean("Root");
  +        LoopBean levelOne = new LoopBean("level1");
  +        LoopBean levelTwo = new LoopBean("level2");
  +        LoopBean levelThree = new LoopBean("level3");
  +        LoopBean levelFour = new LoopBean("level4");
  +        LoopBean levelFive = new LoopBean("level5");
  +        LoopBean notRoot = new LoopBean("Root");
  +        
  +        root.setFriend(levelOne);
  +        levelOne.setFriend(levelTwo);
  +        levelTwo.setFriend(levelThree);
  +        levelThree.setFriend(levelFour);
  +        levelFour.setFriend(levelFive);
  +        levelFive.setFriend(notRoot);
           
           return root;
       }
  
  
  
  1.5       +2 -0      jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/TestBeanWriter.java
  
  Index: TestBeanWriter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/betwixt/src/test/org/apache/commons/betwixt/TestBeanWriter.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TestBeanWriter.java	10 Sep 2002 12:50:43 -0000	1.4
  +++ TestBeanWriter.java	6 Nov 2002 21:40:25 -0000	1.5
  @@ -121,6 +121,8 @@
           
           writer.write( LoopBean.createNoLoopExampleBean() );
           
  +        writer.write( LoopBean.createIdOnlyLoopExampleBean() );
  +        
           try {   
               writer.write( LoopBean.createLoopExampleBean() );   
               fail("CyclicReferenceException not thrown!");
  
  
  

--
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