[Mono-list] Test class for SqlBoolean
Rodrigo Moya
rodrigo@ximian.com
30 Sep 2002 12:04:05 +0200
On Mon, 2002-09-30 at 10:47, Nick Drochak wrote:
> | -----Original Message-----
> | From: mono-list-admin@ximian.com [mailto:mono-list-admin@ximian.com]On
> | Behalf Of ville
> | Sent: Monday, September 30, 2002 12:23 AM
> | To: mono-list
> | Subject: [Mono-list] Test class for SqlBoolean
> |
> |
> |
> | Hi
> |
> | This is my first testsuite. Its for System.Data.SqlTypes.SqlBoolean.
> | I hope this is useful. Also comments and suggestions are welcome
>
>
> Thanks for this. It looks pretty complete. Just a few suggestions:
>
> 1) For AssertEquals() methods the second parameter is the expected value,
> and the third parameter is the actual value. When the assert fails, you
> will get a message saying something like "expected <False> but got <True>."
> If you have the parameters backwards, then you'll spend a lot of time
> debugging the wrong end of the problem.
>
> 2) You could use, for example, just Assert("some message", SqlTrue); instead
> of the AssertEquals for testing boolean values. But that's more a matter of
> style, I guess.
>
> 3) Make sure each Assert*() with a given Test*() method has a unique message
> as the first parameter. This will make it much easier to figure out which
> assert failed in there.
>
> 4) You've got:
> SqlBoolean SqlTrue = new SqlBoolean(true);
> SqlBoolean SqlFalse = new SqlBoolean(false);
> in almost every test method. You might want to make those variables members
> of the test class, and put that code into the Setup() method. That's what
> it's for...common stuff you want done at the beginning of each test.
>
yes, please ville, do what Nick says and resend the file and I'll put it
on CVS.
> Thanks again,
yes, thanks very much
cheers
--
Rodrigo Moya <rodrigo@ximian.com>