• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Writing test case without database operations

 
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How to write test case for classes that calls database operations using entity beans and data of test case should be read from or write into some xml file?
How to use mock objects here?
The application is J2EE based uses EJBs and back end as db2.
Any examples available?

Thanks
Deepa
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are these BMP or CMP entity beans?
 
Lasse Koskela
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Deepa More:
data of test case should be read from or write into some xml file?


Regarding reading the data... If you're using JUnit 3.8, see here for an example of how to write data-driven test cases. If you're using JUnit 4.x, see this instead.

I'm not sure, though, what would you like to write into the XML file?
 
reply
    Bookmark Topic Watch Topic
  • New Topic