[ 
http://issues.apache.org/jira/browse/DERBY-1600?page=comments#action_12423905 ] 
            
Andreas Korneliussen commented on DERBY-1600:
---------------------------------------------

See:
http://junit.sourceforge.net/doc/cookstour/cookstour.htm

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

setUp()
runTest()
tearDown()

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: 10.2.0.0
>            Reporter: Daniel John Debrunner
>             Fix For: 10.2.0.0
>
>
> 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

        

Reply via email to