Created
November 22, 2018 10:41
-
-
Save FagnerMartinsBrack/027e89fe284d40bd1074f1ebef217a5a to your computer and use it in GitHub Desktop.
(Medium) - How TDD Can Prevent Over-Engineering
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
interestAmount = interestAmount.plus(calculateInterest(loanAmount, greaterThan2000)); | |
} | |
- if (loanAmount.greaterThan(Money('$5000.00')) && loanAmount.lessThan(Money('$10001.00'))) { | |
+ if (loanAmount.greaterThan(Money('$5000.00'))) { | |
interestAmount = interestAmount.plus(calculateInterest(loanAmount, greaterThan5000)); | |
} | |
if (loanAmount.greaterThan(Money('$10000.00'))) { | |
- interestAmount = interestAmount.plus(calculateInterest(loanAmount, greaterThan5000)); | |
interestAmount = interestAmount.plus(calculateInterest(loanAmount, greaterThan10000)); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment