Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions content/custom-actions.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<body>
<h1>Writing New Actions</h1>

<p>JMock expectations do two things: test that they receives the expected
<p>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,
Expand All @@ -23,7 +23,7 @@ <h1>Writing New Actions</h1>
object that collects the fruit from a collection <code>FruitTree</code>
objects. It will do so by passing a <code>Collection</code> to the
<code>pickFruit</code> method of the fruit trees. The fruit trees
implement <code>pickFruit</code> by addding their fruit to the collection
implement <code>pickFruit</code> by adding their fruit to the collection
they receive. The <code>FruitTree</code> interface is shown below:</p>

<pre class="Source Java">public interface FruitTree {
Expand All @@ -32,7 +32,7 @@ <h1>Writing New Actions</h1>

<p>To test the behaviour of our object we will need to mock the
<code>FruitTree</code> interface, and in particular we need to stub the
<em>side effect</em> of the <code>pickFruit</code> method. jMock provides
<em>side effect</em> of the <code>pickFruit</code> 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.</p>
Expand Down