db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <derby-...@db.apache.org>
Subject [jira] Commented: (DERBY-1474) Add assertEquals overloads for Blob and Clob
Date Thu, 06 Jul 2006 19:53:30 GMT
    [ http://issues.apache.org/jira/browse/DERBY-1474?page=comments#action_12419589 ] 

Knut Anders Hatlen commented on DERBY-1474:

Hi Kristian,

I think your approach is good. I have a couple of comments about your
BaseTestCase.generateError() method. All of them are minor and just a
matter of taste. Please ignore them if you disagree.

1) I think I would have called it throwAssertionError() and let it
   throw the error, not return it. That would make it analogous to

2) You don't need reflection to generate the
   junit.framework.AssertionFailedError (junit.jar is in the

3) You could also avoid the use of reflection to generate the
   java.lang.AssertionError as well. To do this, you need to modify
   build.xml in the same directory as BaseTestCase.java. In the second
   javac clause, make this change:

-        <pathelement path="${compile.classpath}"/>
+        <pathelement path="${java14compile.classpath}"/>

   Then the classes will be compiled against the 1.4 libraries, but
   since source="1.3" and target="1.3", they will run on 1.3 too. With
   this change, generateError() could be written as simple as this:

        Error error = null;
        if (JVMInfo.JDK_ID <= JVMInfo.J2SE_13) {
            error = new AssertionFailedError(msg + " : " + cause.getMessage());
        } else {
            error = new AssertionError(msg);
        return error;

   This approach is also used in the client driver.

> Add assertEquals overloads for Blob and Clob
> --------------------------------------------
>          Key: DERBY-1474
>          URL: http://issues.apache.org/jira/browse/DERBY-1474
>      Project: Derby
>         Type: Sub-task

>   Components: Test
>     Versions:,
>     Reporter: Kristian Waagan
>     Assignee: Kristian Waagan
>      Fix For:
>  Attachments: derby-1474-1a.diff, derby-1474-1a.stat, derby-1474-1b.diff, derby-1474-1c.diff,
derby-1474-2a.diff, derby-1474-2a.stat, error-output.txt
> Add assertEquals(Blob,Blob) and assertEquals(Clob,Clob) to BaseJDBCTestCase.
> The naming follows the JUnit scheme, and the methods throws an AssertionFailedError if
the objects passed in are not equal.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message