Beruflich Dokumente
Kultur Dokumente
Agenda
Iteration 0 Tools for test-driven development Iteration 1 Test-driven development Iteration 2 Interaction-based testing Iteration 3 Lightweight containers
Copyright ThoughtWorks, Inc. 2004-2006
Iteration 1
#1
As a wallet owner I would like to be able to put money into my wallet so that I can take it out later.
Iteration 1
#2
As a wallet owner I would like to be able to see how much money is in my wallet.
Iteration 1
#3
As a wallet owner I would like to be able to take a specified amount of money out of the wallet.
10
Iteration 1
account As a wallet owner I would like to be able to take out more money than I have, so that I can buy things I can't afford.
#3b
11
12
Collaborating Objects
An object-oriented program is organised as a web of collaborating objects
14
Using Mocks
To isolate the tested object we replace its neighbours with mock objects
Mock
15
Iteration 2
#4
16
Iteration 2
As an auditor I would like Task 1: to be notified whenever an Introduce AccountService account is overdrawn.
#4 #4.1
17
Iteration 2
As an auditor I would like Task 2: to be notified whenever an Add audit service and logic account is overdrawn.
#4 #4.2
18
Iteration 2
#5
19
Iteration 2
#6
As an auditor I would like to be notified whenever more than 10,000 are withdrawn from an account in one transaction.
20
21
Iteration 3
Where is my application?
23
PicoContainer
pico container
classes objects
24
25
Iteration 3
26
Dependency resolution
Service Locator
Service Locator
Dependency Injection
Dependency Injector
27
28
Iteration 3
29
31
32
The end