• 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
  • Tim Holloway
  • Carey Brown
  • salvin francis

TDD with Spring and Hibernate

Ranch Hand
Posts: 1346
Netbeans IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Im writing code using TDD, for the business logic there is not problem. Should I have into account that Im using Hibernate and Spring?

Or TDD as it work with independent POJO. Doesnt change depending of the framework Im using?

Any advice or guiding please?


Ranch Hand
Posts: 55
Mac OS X IntelliJ IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't cleary understand your question, but let me try.

Use "Outside in Development with double loop":

In short, you write a failing Aceptance-Test, that tests your feature on a very highlevel basis.
This would not be interested in Hibernate or Spring, but in the results returned from your component or feature (which would internally use Hibernate and Spring, if that's what you use).
The Unit-Tests would ideally only test on class each, and mock every dependency used by the class. For this, I recommend you to use the Mockito Testframework.

Hope that helps.
All of life is a contant education - Eleanor Roosevelt. Tiny ad:
create, convert, edit or print DOC and DOCX in Java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!