The Artima Developer Community
Sponsored Link

Java Answers Forum
JUnit and JDBC connections

1 reply on 1 page. Most recent reply: May 21, 2003 2:37 AM by Adam Duffy

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Vincent O'Sullivan

Posts: 724
Nickname: vincent
Registered: Nov, 2002

JUnit and JDBC connections Posted: May 20, 2003 4:41 AM
Reply to this message Reply
Advertisement
I'm putting together a fairly simple app that uses JDBC to access a database. In the development process I'm using JUnit to provide the usual unit testing but the way I'm doing it is proving a bit unwieldy when it comes to testing data connections, data retrieval, etc.

Rather than spend a week reinventing a (wonky) wheel - instead of developing the app, could someone point me to a site that covers this sort of thing. I've had a quick look at Mock Objects but the solution appears to be more complex than the problem. Are they worth persevering with or are other simpler techniques available?

Vince.


Adam Duffy

Posts: 168
Nickname: adamduffy
Registered: Feb, 2003

Re: JUnit and JDBC connections Posted: May 21, 2003 2:37 AM
Reply to this message Reply
I used MockObjects for testing JDBC and I found that it works. It takes a bit of work to figure out how to write your code to work with MockObjects but the end result is better code quality.

I don't know of other techniques but if anyone knows of some, please let us know! :)

Adam

Flat View: This topic has 1 reply on 1 page
Topic: word count/tokenizer/comparator Previous Topic   Next Topic Topic: I am getting to much flickerence in applet

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use