diff --git a/content/custom-actions.html b/content/custom-actions.html index 05217d0..43bc996 100644 --- a/content/custom-actions.html +++ b/content/custom-actions.html @@ -9,7 +9,7 @@

Writing New Actions

-

JMock expectations do two things: test that they receives the expected +

JMock expectations do two things: test that they receive the expected method invocations and stub the behaviour of those methods. Almost all methods can be stubbed in one of three basic ways: return nothing (a void method), return a result to the caller or throw an exception. Sometimes, @@ -23,7 +23,7 @@

Writing New Actions

object that collects the fruit from a collection FruitTree objects. It will do so by passing a Collection to the pickFruit method of the fruit trees. The fruit trees - implement pickFruit by addding their fruit to the collection + implement pickFruit by adding their fruit to the collection they receive. The FruitTree interface is shown below:

public interface FruitTree {
@@ -32,7 +32,7 @@ 

Writing New Actions

To test the behaviour of our object we will need to mock the FruitTree interface, and in particular we need to stub the - side effect of the pickFruit method. jMock provides + side effect of the pickFruit method. JMock provides actions for returning values and iterators, throwing exceptions and grouping other actions but we will have to write our own action class to stub the side effect.