Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 30149ee

Browse files
committed
Removing code that was not used in the book.
The corrent example is listing 6.18 and is already included in CardinalityMockingSpec.groovy
1 parent e039e34 commit 30149ee

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

‎chapter6/src/test/groovy/com/manning/spock/chapter6/mocks/ArgumentTypeVerificationSpec.groovy‎

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -50,28 +50,6 @@ class ArgumentTypeVerificationSpec extends spock.lang.Specification{
5050
2 * inventory.isProductAvailable(_ as String ,_ as Integer) >> true
5151
}
5252

53-
def "Warehouse is queried for each product - stric "() {
54-
given: "a basket, a TV and a camera"
55-
Product tv = new Product(name:"bravia",price:1200,weight:18)
56-
Product camera = new Product(name:"panasonic",price:350,weight:2)
57-
Basket basket = new Basket()
58-
59-
and: "a warehouse with limitless stock"
60-
WarehouseInventory inventory = Mock(WarehouseInventory)
61-
basket.setWarehouseInventory(inventory)
62-
63-
when: "user checks out both products"
64-
basket.addProduct tv
65-
basket.addProduct camera
66-
boolean readyToShip = basket.canShipCompletely()
67-
68-
then: "order can be shipped"
69-
readyToShip
70-
2 * inventory.isProductAvailable(_, _) >> true
71-
1 * inventory.isEmpty() >> false
72-
0 * inventory._
73-
}
74-
7553

7654
}
7755

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /