From 67a86cc5e0ca67ba410d6d3a543f7fd448119922 Mon Sep 17 00:00:00 2001
From: Oli Bye 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
- 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.