BIG WARNING: Clock.today() is not under test!!!!
authorGustavo Martin Morcuende <gustavo.martin@scmspain.com>
Sun, 4 Dec 2016 20:21:43 +0000 (21:21 +0100)
committerGustavo Martin Morcuende <gustavo.martin@scmspain.com>
Sun, 4 Dec 2016 20:29:59 +0000 (21:29 +0100)
Our tests do not fail even if we return null from there...

TDD/sandromancuso/bank/src/main/java/org/craftedsw/feature/Clock.java

index f5c8798..30c7150 100644 (file)
@@ -13,7 +13,13 @@ public class Clock {
 
        // We isolated the randomness in here.
        protected LocalDate today() {
+               // QUESTION FOR SANDRO MANCUSO:
+               // This line of code is not under test, so if someone makes
+               // a change here our unit tests will not fail!!! :/
                return LocalDate.now();
+               // If someone writes:
+               // return null
+               // nothing happens, tests keep going green... :(
        }
 
 }