db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mpoes...@apache.org
Subject cvs commit: db-torque/src/generator/src/test/org/apache/torque/engine/database/model TableTest.java
Date Sat, 04 Oct 2003 11:54:41 GMT
mpoeschl    2003/10/04 04:54:41

  Modified:    src/generator/src/test/org/apache/torque/engine/database/model
                        TableTest.java
  Log:
  add referrers test
  
  Revision  Changes    Path
  1.4       +12 -1     db-torque/src/generator/src/test/org/apache/torque/engine/database/model/TableTest.java
  
  Index: TableTest.java
  ===================================================================
  RCS file: /home/cvs/db-torque/src/generator/src/test/org/apache/torque/engine/database/model/TableTest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TableTest.java	4 Oct 2003 10:11:33 -0000	1.3
  +++ TableTest.java	4 Oct 2003 11:54:41 -0000	1.4
  @@ -146,4 +146,15 @@
           assertEquals(fk.getForeignTableName(), "multipk");
           assertTrue(fk.getForeignColumns().size() == 2);
       }
  +    
  +    public void testReferrers() throws Exception
  +    {
  +        Database db = appData.getDatabase("iddb");
  +        Table table = db.getTable("singlepk");
  +        List refs = table.getReferrers();
  +        assertTrue(refs.size() == 1);
  +        ForeignKey fk = (ForeignKey) refs.get(0);
  +        assertEquals(fk.getTableName(), "singlefk");        
  +    }
  +    
   }
  
  
  

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


Mime
View raw message