From: Gustavo Martin Morcuende Date: Sun, 4 Dec 2016 20:21:43 +0000 (+0100) Subject: BIG WARNING: Clock.today() is not under test!!!! X-Git-Url: https://git.gumartinm.name/?a=commitdiff_plain;h=441478442f5f657b1bac1f9092a3e2348e0cb6f8;p=JavaForFun BIG WARNING: Clock.today() is not under test!!!! Our tests do not fail even if we return null from there... --- diff --git a/TDD/sandromancuso/bank/src/main/java/org/craftedsw/feature/Clock.java b/TDD/sandromancuso/bank/src/main/java/org/craftedsw/feature/Clock.java index f5c8798..30c7150 100644 --- a/TDD/sandromancuso/bank/src/main/java/org/craftedsw/feature/Clock.java +++ b/TDD/sandromancuso/bank/src/main/java/org/craftedsw/feature/Clock.java @@ -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... :( } }