db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel John Debrunner (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-2299) convert cursor.java to junit
Date Tue, 13 Feb 2007 05:19:05 GMT

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

Daniel John Debrunner commented on DERBY-2299:
----------------------------------------------

The use of assertEquals in the converted test has the arguments the wrong way around.

		assertEquals(1956, cursor.getInt(1));
		assertEquals("hello world", cursor.getString(2).trim());

http://www.junit.org/junit/javadoc/3.8.1/junit/framework/Assert.html

static void 	assertEquals(int expected, int actual) 

While it doesn't make a difference when the test passes, it does when it fails. The output
provided by the method will give the wrong information to the person trying to resolve the
failure, since the expected and actual will be switched in the message. This has the potential
to waste tiem and confuse people.

> convert cursor.java to junit
> ----------------------------
>
>                 Key: DERBY-2299
>                 URL: https://issues.apache.org/jira/browse/DERBY-2299
>             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_2299.stat, DERBY_2299.txt, DERBY_2299_2.txt
>
>
> Convert cursor.java to junit

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


Mime
View raw message