[
https://issues.apache.org/jira/browse/DERBY-3751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12610183#action_12610183
]
Kristian Waagan commented on DERBY-3751:
----------------------------------------
Thank you, Junjie.
1) I don't think the two tests test the same thing.
case.sql : Tests keyword case insensitivity, i.e. both "seLEcT" and "select"
should work.
CaseExpressionTest : Tests the SQL conditional statement CASE. An example:
UPDATE inventory SET price = price *
CASE
WHEN quantity > 20 THEN 0.75
WHEN quantity BETWEEN 10 AND 20 THEN 0.90
ELSE 0.95
END;
If my statement above is correct, I wold prefer to put the test elsewhere.
Finding the right place isn't always straight-forward.
I think it should be in the lang directory, but I couldn't find a better home
by looking at the tests in there.
I'll let you decide if you want to keep it where it is, create a new class or
put it elsewhere. The existing test is rather limited, so one can imagine the
test being extended later.
Your latest patch looks good. It can be committed once we agree on where the
test should live.
If you wanted to improve it further, you could;
a) Use 'JDBC.assertSingleValueResultSet' instead of 'assertFullResultSet'.
b) Remove trailing whitespace. Many of the seemingly blank lines contain 8
space characters.
thanks,
> Convert case.sql to junit
> -------------------------
>
> Key: DERBY-3751
> URL: https://issues.apache.org/jira/browse/DERBY-3751
> Project: Derby
> Issue Type: Test
> Components: Test
> Environment: Windows Xp, sp2.
> Reporter: Junjie Peng
> Assignee: Junjie Peng
> Attachments: derby-3751-1-patch.txt, derby-3751-1-stat.txt,
> derby-3751-patch.txt
>
> Original Estimate: 72h
> Remaining Estimate: 72h
>
> In the package "org.apache.derbyTesting.functionTests.tests.lang", we have
> both "CaseExpressionTest.java" and "case.sql", which are both about case.
> Now, I would like to convert "case.sql" to junit, and I will add new test
> cases into "CaseExpressionTest.java" ?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.