db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ravinder Reddy Pandiri <pand...@students.iiit.ac.in>
Subject Re: Creating an Open cursor..
Date Tue, 07 Aug 2007 17:47:19 GMT
On Tue, 7 Aug 2007, Daniel John Debrunner wrote:

> Ravinder Reddy Pandiri wrote:
>
>>     assertUpdateCount(s , 0 , "create table t2(c21 int not null primary 
>> key)");
>>         assertUpdateCount(s , 1 , "insert into t2 values(21)");
>>         assertUpdateCount(s , 1 , "insert into t2 values(22)");
>
> On a separate issue I would avoid having asserts for every line of code in a 
> test. Use asserts only for the actual elements that are being tested. In this 
> case the create table and inserts are not really part of the test fixture, 
> they are set up code.
>
> This is to allow the tests to be easy to understand and to allow someone 
> looking at the code later to instantly see what the focus of the test fixture 
> is. E.g. if there are three lines with assert code then it's obvious that's 
> the focus of the test fixture. If those three lines are hidden within ten 
> other asserts that assert any setup up or cleanup code then it becomes less 
> obvious what is going on.
>
> The correct update count from an INSERT or a CREATE TABLE should only be in 
> the text class & fixtures that are explicitly testing INSERT or CREATE TABLE.
>
> Dan.
 	Thank You Kathey and Dan.
 		Definately I will consider this for my next conversions.

>
>
>
>

-- 
******************************************************************************

    Every problem that has been solved can be solved again in a better way

                                                   - Ravinder Reddy

*******************************************************************************


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


Mime
View raw message