db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Korneliussen (JIRA)" <derby-...@db.apache.org>
Subject [jira] Commented: (DERBY-1600) JUnit test SURQueryMixTest does not follow the typical pattern for JUnit tests.
Date Thu, 27 Jul 2006 20:15:14 GMT
    [ http://issues.apache.org/jira/browse/DERBY-1600?page=comments#action_12423905 ] 
Andreas Korneliussen commented on DERBY-1600:


run() is a template method, it will call:


runTest() default implementation is to use reflection and find a test method to call. This
is usually the easiest way to achieve reuse of the code. In this case, I wanted the test to
run the same testcode, however on a variation of SQL queries, and data models, and it made
more sense to solve it by overriding runTest(), and give parameters in constructor for the
different parameters.

I do not see how an existing junit test would slow down any progress of moving other tests
to junit.

> JUnit test SURQueryMixTest does not follow the typical pattern for JUnit tests.
> -------------------------------------------------------------------------------
>                 Key: DERBY-1600
>                 URL: http://issues.apache.org/jira/browse/DERBY-1600
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions:
>            Reporter: Daniel John Debrunner
>             Fix For:
> SURQueryMixTest overrides runtest instead of providing individual test methods, I think
this means its setUp and tearDown methods would not be called.
> It does not have such methods at the present, bu if someone needed to add them then they
would waste time figuring out why the methods were never called.
> JUnit tests in derby should follow the established pattern, see 
> http://junit.sourceforge.net/doc/cookbook/cookbook.htm
> http://wiki.apache.org/db-derby/DerbyJUnitTesting
> Slows down the progress to moving to JUnit for all tests.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message