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 TypedCollectionsTest.java
Date Mon, 11 Aug 2003 20:44:39 GMT
arminw      2003/08/11 13:44:39

  Modified:    src/test/org/apache/ojb/broker TypedCollectionsTest.java
  Log:
  do not catch exception
  
  Revision  Changes    Path
  1.7       +14 -25    db-ojb/src/test/org/apache/ojb/broker/TypedCollectionsTest.java
  
  Index: TypedCollectionsTest.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/broker/TypedCollectionsTest.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- TypedCollectionsTest.java	5 Feb 2003 20:03:42 -0000	1.6
  +++ TypedCollectionsTest.java	11 Aug 2003 20:44:39 -0000	1.7
  @@ -15,14 +15,13 @@
   
   	PersistenceBroker broker;
   	private static Class CLASS = TypedCollectionsTest.class;
  -	private int testId = 88884;
   
   	/**
   	 * Insert the method's description here.
   	 * Creation date: (24.12.2000 00:33:40)
   	 */
   	public TypedCollectionsTest(String name)
  -	
  +
   	{
   		super(name);
   	}
  @@ -59,9 +58,7 @@
   	 */
   	public void setUp() throws PBFactoryException
   	{
  -
   		broker = PersistenceBrokerFactory.defaultPersistenceBroker();
  -
   	}
   
   	/**
  @@ -79,32 +76,24 @@
   		catch (PersistenceBrokerException e)
   		{
   		}
  -
   	}
   
   	/** Test support for 1-n relations modelled with Arrays*/
  -	public void testArray()
  +	public void testArray() throws Exception
   	{
   		int i;
  -		try
  -		{
  -			for (i = 1; i < 4; i++)
  -			{
  -				ProductGroupWithArray example = new ProductGroupWithArray();
  -				example.setId(i);
  -				ProductGroupWithArray group =
  -					(ProductGroupWithArray) broker.getObjectByQuery(new QueryByIdentity(example));
  -				assertEquals("should be equal", i, group.getId());
  -				//System.out.println(group + "\n\n");
  -
  -				broker.delete(group);
  -				broker.store(group);
  -			}
  -		}
  -		catch (Throwable t)
  -		{
  -			fail(t.getMessage());
  -		}
  +        for (i = 1; i < 4; i++)
  +        {
  +            ProductGroupWithArray example = new ProductGroupWithArray();
  +            example.setId(i);
  +            ProductGroupWithArray group =
  +                (ProductGroupWithArray) broker.getObjectByQuery(new QueryByIdentity(example));
  +            assertEquals("should be equal", i, group.getId());
  +            //System.out.println(group + "\n\n");
  +
  +            broker.delete(group);
  +            broker.store(group);
  +        }
   	}
   
   	/** TestThreadsNLocks support for modelling 1-n relations with typed collections*/
  
  
  

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