From f7fb6175d82a06577bddc46f36115a0e6b594d8a Mon Sep 17 00:00:00 2001 From: Gustavo Martin Morcuende Date: Sun, 4 Dec 2016 21:21:43 +0100 Subject: [PATCH] BIG WARNING: Clock.today() is not under test!!!! Our tests do not fail even if we return null from there... --- .../bank/src/main/java/org/craftedsw/feature/Clock.java | 6 ++++++ 1 file changed, 6 insertions(+) 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... :( } } -- 2.1.4