db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject cvs commit: db-ojb/src/test/org/apache/ojb/broker M2NGraphTest.java NestedFieldsTest.java
Date Thu, 24 Jun 2004 21:58:53 GMT
arminw      2004/06/24 14:58:53

  Modified:    src/test/org/apache/ojb/broker M2NGraphTest.java
                        NestedFieldsTest.java
  Log:
  - inherit from OJB TestCase
  - add getter/setter
  
  Revision  Changes    Path
  1.2       +12 -2     db-ojb/src/test/org/apache/ojb/broker/M2NGraphTest.java
  
  Index: M2NGraphTest.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/broker/M2NGraphTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- M2NGraphTest.java	23 Jun 2004 18:24:17 -0000	1.1
  +++ M2NGraphTest.java	24 Jun 2004 21:58:53 -0000	1.2
  @@ -5,9 +5,9 @@
   import java.util.List;
   
   import org.apache.commons.lang.builder.ToStringBuilder;
  -import org.apache.ojb.junit.PBTestCase;
   import org.apache.ojb.broker.metadata.ClassDescriptor;
   import org.apache.ojb.broker.metadata.CollectionDescriptor;
  +import org.apache.ojb.junit.PBTestCase;
   
   /* Copyright 2002-2004 The Apache Software Foundation
    *
  @@ -394,6 +394,11 @@
               return parents;
           }
   
  +        public void setParents(List parents)
  +        {
  +            this.parents = parents;
  +        }
  +
           public List getChildren()
           {
               if (children == null)
  @@ -401,6 +406,11 @@
                   children = new ArrayList();
               }
               return children;
  +        }
  +
  +        public void setChildren(List children)
  +        {
  +            this.children = children;
           }
   
           public String toString()
  
  
  
  1.9       +6 -31     db-ojb/src/test/org/apache/ojb/broker/NestedFieldsTest.java
  
  Index: NestedFieldsTest.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/broker/NestedFieldsTest.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- NestedFieldsTest.java	5 Apr 2004 17:11:48 -0000	1.8
  +++ NestedFieldsTest.java	24 Jun 2004 21:58:53 -0000	1.9
  @@ -1,30 +1,22 @@
   package org.apache.ojb.broker;
   
  -import junit.framework.TestCase;
  +import java.util.ArrayList;
  +import java.util.Collection;
  +
   import org.apache.commons.lang.builder.ToStringBuilder;
   import org.apache.commons.lang.builder.ToStringStyle;
  -import org.apache.ojb.broker.query.QueryFactory;
   import org.apache.ojb.broker.query.Criteria;
   import org.apache.ojb.broker.query.Query;
  -import org.apache.ojb.junit.OJBTestCase;
  -
  -import java.util.Collection;
  -import java.util.ArrayList;
  +import org.apache.ojb.broker.query.QueryFactory;
  +import org.apache.ojb.junit.PBTestCase;
   
   
   /**
    * This TestCase checks the NestedField support
    * @author Thomas Mahler
    */
  -public class NestedFieldsTest extends TestCase
  +public class NestedFieldsTest extends PBTestCase
   {
  -    PersistenceBroker broker;
  -
  -    public NestedFieldsTest(String name)
  -    {
  -        super(name);
  -    }
  -
       /**
        * launches the TestCase.
        */
  @@ -33,23 +25,6 @@
   
           String[] arr = {NestedFieldsTest.class.getName()};
           junit.textui.TestRunner.main(arr);
  -    }
  -
  -    /**
  -     * Setting up the test fixture.
  -     */
  -    public void setUp()
  -    {
  -        // obtain broker instance
  -        broker = PersistenceBrokerFactory.defaultPersistenceBroker();
  -    }
  -
  -    /**
  -     * tearing down the test fixture.
  -     */
  -    public void tearDown()
  -    {
  -        broker.close();
       }
   
       public void testStoreReadNestedField()
  
  
  

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


Mime
View raw message