db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Rall <...@collab.net>
Subject Re: cvs commit: db-torque/src/generator/src/test/org/apache/torque/engine/database/transform mysql.sql SQLToAppDataTest.java
Date Tue, 09 Dec 2003 02:06:24 GMT
Martin Poeschl wrote:
> Daniel Rall wrote:
> 
>> Woo, more tests!
>>
>> mpoeschl@apache.org wrote:
>> ...
>>
>>>   public class SQLToAppDataTest extends TestCase
>>>   {
>>>             /**
>>>        * Class to test for void SQLToAppData(String, String)
>>>        */
>>>       public void testMySql() throws Exception
>>>       {
>>>           SQLToAppData sqlToAppData = new SQLToAppData(
>>>                   
>>> "src/test/org/apache/torque/engine/database/transform/mysql.sql",
>>>                   "mysql");
>>>           Database db = sqlToAppData.execute();
>>>           assertTrue(db.getTables().size() > 0);
>>>           Table course = db.getTable("course");
>>>           assertTrue(course != null);
>>
>>
>>
>> The above two lines could be written as:
>>
>> assertNotNull(db.getTable("course"));
> 
> 
> right .. but there will be more tests using the table soon ;-)

Nice.  ;-)

You could still take advatage of the easily human-readable assertNotNull() API, 
as opposed to inlining the null check and calling assertTrue().



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