[
https://issues.apache.org/jira/browse/DERBY-2382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12476885
]
Knut Anders Hatlen commented on DERBY-2382:
-------------------------------------------
Since the old test verifies that the values are correct, I think the new one
should do that too, unless it's covered by other tests. It's kind of important
that the returned value of a cast is correct... ;)
Some minor nits:
- tearDown() should call super.tearDown()
- in some cases fail() is used to report an unexpected exception. I think
it's better just to (re-)throw the exception so that we preserve the stack
trace.
- some uses of fail, like
+ if (!isSupportedAssignment(sourceType,targetType))
+ fail(description + "should not succeed");
would perhaps be clearer if they were written as assertTrue(...)
- the indentation is a bit inconsistent (some places 4 characters, but most
places 8)
- most of the "public static" methods could be "private static", I think
- the test methods are declared as "throws SQLException, Throwable". I don't
think the Throwable is needed (but I haven't checked, so I might be wrong)
> Convert casting.java to Junit
> -----------------------------
>
> Key: DERBY-2382
> URL: https://issues.apache.org/jira/browse/DERBY-2382
> Project: Derby
> Issue Type: Task
> Components: Test
> Affects Versions: 10.3.0.0
> Reporter: Kathey Marsden
> Assigned To: Kathey Marsden
> Priority: Minor
> Fix For: 10.3.0.0
>
> Attachments: DERBY_2382.diff
>
>
> Convert casting.java to Junit
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.