db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manjula G Kutty <manjula.ku...@gmail.com>
Subject Junit test question
Date Wed, 31 Jan 2007 20:32:47 GMT

I'm very new to the junit testing. So I picked lang/currentof.java as my 
first test to convert to junit. I did it with the very little knowledge 
I have and also with the help of the Wiki.  I got the test running to 
some extend but then I get some errors on the testUpdate. The error says 
"Invalid cursor state" . I tried using printf to see how the control 
goes and I could see the number of rows expected and got are 0. So it 
should come out of the  verifycount method, but it is not. There may be 
3 reasons for this. Either I didn't understand the test fully or did 
something wrong while converting or there may be bug . Can someone 
please review the attached code(I know it is not a very clean code) and 
let me know what went wrong??

One more question where will  the test database gets created? Even the 
test fails will the teardown method deletes all tables? If so is there a 
mechanism to access the database or copy the database instance when the 
test went wrong?

Thanks in advance

View raw message