-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#3] Use test to express the design, as Kent Beck suggested in his book
- Loading branch information
1 parent
1f4f73e
commit 61fb649
Showing
4 changed files
with
22 additions
and
5 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
src/main/java/org/thoughtworks/linesh/multicurrencymoney/Bank.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package org.thoughtworks.linesh.multicurrencymoney; | ||
|
||
public class Bank { | ||
public Money reduced(Expression money, String currency) { | ||
return Money.dollar(10); | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
src/main/java/org/thoughtworks/linesh/multicurrencymoney/Expression.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package org.thoughtworks.linesh.multicurrencymoney; | ||
|
||
public interface Expression { | ||
Expression plus(Money money); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters