Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Q 4 J. B. Rainsberger (2): preconditions for a recipe

 
Gian Franco
blacksmith
Ranch Hand
Posts: 979
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear author,

I've started to read other literature on the
subject of JUnit and having read the first
chapters I can't yet see how the idea
of a recipe can be applied to help the
programmer in a specific situation.

Does this imply that the recipe in your book
requires a certain programming style, like the
use of patterns or any other 'standard'?

Thank you,

Gian Franco Casula
[ August 10, 2004: Message edited by: Gian Franco Casula ]
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Gian Franco Casula:
I've started to read other literature on the
subject of JUnit and having read the first
chapters I can't yet see how the idea
of a recipe can be applied to help the
programmer in a specific situation.


The recipes stand for problems a developer might face while using JUnit, such as "how to test a method with void return type" or "how should I organize my tests" and discuss their solutions.

Does this help you see how the idea of a recipe might help you?
 
J. B. Rainsberger
author
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gian Franco:

Suppose you have a specific problem, like you want to test a legacy container-managed persistence entity bean. Suppose further that you want to test it as much as possible without using the container. Now that you have defined the problem, you look for a solution. _JUnit Recipes_ might have a solution. (In this case, it does: recipe 11.5)

The principal difference between this book and others is its focus: you have a problem, you look for a solution. With other books, you'd perhaps look through the index, then see whether any entries are relevant. With _JUnit Recipes_, simply scan the table of contents to find the most similar problem to yours, then read the corresponding solution to see whether it helps.
 
somkiat puisungnoen
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Testing Solutions in this Book are like pattern for sovle problem or not ???
 
J. B. Rainsberger
author
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JUnit Recipes contains specific solutions to specific problems.

While describing those solutions, it makes references to patterns of problem solving. The patterns are not explicit, but as you read, you will notice them.
 
somkiat puisungnoen
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic