db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kathey Marsden <kmarsdende...@sbcglobal.net>
Subject Re: [jira] Commented: (DERBY-2658) Convert jdbcapi/parameterMetaDataJdbc30.java to JUnit
Date Mon, 04 Jun 2007 17:43:05 GMT
Ramin Moazeni wrote:
> Hi
> I need to confirm that for converting the System.out's from the old
> tests into assertions for example System.out.println("parameters count
> for callable statement is: " + paramMetaData.getParameterCount());
> I have to look up the expected value in the
> functionTests/master/parameterMetaDataJdbc30.out when I translate
> this to assertEquals?

You can do it one of two ways.  You can find out the expected value a 
couple different ways that I can think of.
1)  Look at the test and see how many parameters there are.  For example 
you have 4 parameters like in  cs = con.prepareCall("CALL 
dummyint(?,?,?,?)"), the expected value is 4.
2) Look at the canon (.out file) and see what the value was.

Regardless you will end up with an assertion like:

assertEquals("Unexpected parameter count", x, 

where x is the expected value.
I hope that answers your question.


View raw message