mockrunner

A collection of 1 posts

A Java geek
  • Me
  • Books
  • Speaking
  • Mentions
  • Focus
Apr 22, 2009 isolation mock mockito mockrunner test

Two different mocking approaches

Whether you choose to choose to adopt TDD or a more traditional approach, you will test your classes in isolation. This usually mean you code with interfaces and inject your dependencies in your classes. Last year, I had to test a servlet. Servlets are the showcase to demonstrate out-of-container testing because of their dependencies to said container in their doXxx() method. Every one of these methods has a dependency on HttpServletRequest and HttpServletResponse. Both are interfaces that have

Nicolas Fränkel
A Java geek © 2008-2025
v. 7cda6293d49f4652dca36622366b5a88acdbbcea/11689198777
Latest Posts