Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 62780 invoked from network); 7 Aug 2007 17:47:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Aug 2007 17:47:05 -0000 Received: (qmail 19806 invoked by uid 500); 7 Aug 2007 17:47:03 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 19763 invoked by uid 500); 7 Aug 2007 17:47:03 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 19754 invoked by uid 99); 7 Aug 2007 17:47:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Aug 2007 10:47:03 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of pandiri@students.iiit.ac.in designates 196.12.53.11 as permitted sender) Received: from [196.12.53.11] (HELO students.iiit.ac.in) (196.12.53.11) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Aug 2007 17:46:58 +0000 Received: from students.iiit.ac.in (localhost.localdomain [127.0.0.1]) by students.iiit.ac.in (8.14.1/8.13.0) with ESMTP id l77HlJ1T000437 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 7 Aug 2007 23:17:19 +0530 Received: from localhost (pandiri@localhost) by students.iiit.ac.in (8.14.1/8.14.1/Submit) with ESMTP id l77HlJqO000434 for ; Tue, 7 Aug 2007 23:17:19 +0530 Date: Tue, 7 Aug 2007 23:17:19 +0530 (IST) From: Ravinder Reddy Pandiri To: derby-dev@db.apache.org Subject: Re: Creating an Open cursor.. In-Reply-To: <46B87D04.90501@apache.org> Message-ID: References: <4697D43B.2050601@sbcglobal.net> <469E4A90.1030301@amberpoint.com> <46A13D20.4090703@sbcglobal.net> <46B87D04.90501@apache.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-yoursite-MailScanner-Information: Please contact the IIIT Server Room for more information X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: pandiri@students.iiit.ac.in X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No 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.