• 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 ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

TDD with Spring and Hibernate

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

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?

Regards,
Isaac

 
Ranch Hand
Posts: 55
4
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":
http://coding-is-like-cooking.info/2013/04/outside-in-development-with-double-loop-tdd/

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
https://products.aspose.com/words/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!