[ 
https://issues.apache.org/jira/browse/DERBY-2854?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12510155
 ] 

Knut Anders Hatlen commented on DERBY-2854:
-------------------------------------------

Some general comments:

  1) The argument order is wrong for the calls to assertEquals(). The expected 
value should come before the actual value.
  2) The baseSuite() method could be removed, and suite() could be implemented 
as a simple call to TestConfiguration.defaultSuite(ResultSetMethodsTest.class).
  3) There's no need for the savedAutoCommit field since each fixture gets a 
new connection.
  4) Catching exceptions just to call fail() should be avoided as it will 
swallow the stack trace. The exception should rather be propagated up the call 
stack and handled by the JUnit framework.
  5) assertEquals(...true...) and assertEquals(...false...) should be replaced 
with assertTrue() and assertFalse().
  6) When assertSQLState() is called, there is no need to call 
assertNotNull(sqle.getSQLState()).

> Convert jdbc4/TestResultSetMethods.java to JUnit
> ------------------------------------------------
>
>                 Key: DERBY-2854
>                 URL: https://issues.apache.org/jira/browse/DERBY-2854
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.3.0.0
>            Reporter: Ramin Moazeni
>            Assignee: Ramin Moazeni
>         Attachments: DERBY-2854v0.diff, DERBY-2854v0.stat
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to