db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@apache.org
Subject cvs commit: db-ojb/src/test/org/apache/ojb/broker PersistenceBrokerTest.java
Date Mon, 23 Jun 2003 19:35:47 GMT
brj         2003/06/23 12:35:47

  Modified:    src/test/org/apache/ojb/broker PersistenceBrokerTest.java
  Log:
  use ProductGroup not it's id in Article
  
  Revision  Changes    Path
  1.26      +15 -5     db-ojb/src/test/org/apache/ojb/broker/PersistenceBrokerTest.java
  
  Index: PersistenceBrokerTest.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/broker/PersistenceBrokerTest.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- PersistenceBrokerTest.java	21 Jun 2003 13:25:34 -0000	1.25
  +++ PersistenceBrokerTest.java	23 Jun 2003 19:35:47 -0000	1.26
  @@ -43,6 +43,9 @@
        */
       protected Article createArticle(int id)
       {
  +        ProductGroup pg;
  +        pg = new ProductGroup();
  +        pg.setId(1);
   
           Article a = new Article();
           a.setArticleId(id);
  @@ -51,7 +54,7 @@
           a.setMinimumStock(100);
           a.setOrderedUnits(17);
           a.setPrice(0.45);
  -        a.setProductGroupId(1);
  +        a.setProductGroup(pg);
           a.setStock(234);
           a.setSupplierId(4);
           a.setUnit("bottle");
  @@ -61,6 +64,9 @@
   
       protected CdArticle createCdArticle(int id)
       {
  +        ProductGroup pg;
  +        pg = new ProductGroup();
  +        pg.setId(1);
   
           CdArticle a = new CdArticle();
           a.setArticleId(id);
  @@ -69,7 +75,7 @@
           a.setMinimumStock(100);
           a.setOrderedUnits(17);
           a.setPrice(9.95);
  -        a.setProductGroupId(1);
  +        a.setProductGroup(pg);
           a.setStock(234);
           a.setSupplierId(4);
           a.setUnit("cd");
  @@ -215,14 +221,18 @@
       public void testDeleteByQuery() throws Exception
       {
           int groupId = 7;
  +        ProductGroup pg;
  +        pg = new ProductGroup();
  +        pg.setId(groupId);
  +                
           Article a = createArticle(300 * testId);
  -        a.setProductGroupId(groupId);
  +        a.setProductGroup(pg);
   
           Article b = createArticle(300 * testId + 1);
  -        b.setProductGroupId(groupId);
  +        b.setProductGroup(pg);
   
           CdArticle c = createCdArticle(300 * testId + 2);
  -        c.setProductGroupId(groupId);
  +        c.setProductGroup(pg);
   
           storeArticle(a);
           storeArticle(b);
  
  
  

Mime
View raw message