-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ 【第3章 三角測量】equals メソッドのテストを実装しとりあえずテストが成功するまで実装する
なぜ equals メソッドを実装しなければならないのか?(以下の理由をつらつらと記載 ・今回使っている Dollar オブジェクトは Value Object パターンと呼ばれている。 ・Value Object には、コンストラクタで設定したインスタンス変数の値が変わってはならないという制約がある ・Value Object であるためには操作はすべて新しいオブジェクトを返さなければならない ・Value Object は equals メソッドを実装しなければならい
- Loading branch information
1 parent
0570b0f
commit cae0187
Showing
3 changed files
with
10 additions
and
0 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -3,3 +3,4 @@ | |
- [ ] amount を private にする | ||
- [x] Dollar の副作用どうする? | ||
- [ ] Money の丸め処理どうする? | ||
- [ ] equals()メソッドの実装 |
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