From acb1194e960c902d9d0f7e9644055125df923cf8 Mon Sep 17 00:00:00 2001 From: MajidFatima Date: Mon, 11 Mar 2019 23:06:59 +0100 Subject: [PATCH] Last commit #1 rename all messages (fr to en) this commit fixes #1 --- .idea/workspace.xml | 56 ++++++++++--------- .../stringcalculatortdd/StringCalculator.java | 6 +- 2 files changed, 34 insertions(+), 28 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index da18e2f..b7daeda 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,7 +2,7 @@ - + @@ -165,7 +168,7 @@ - + @@ -238,14 +241,11 @@ - - - @@ -273,9 +273,12 @@ + + + - @@ -420,31 +423,34 @@ - + - - + + - + - - + + - + - - + + - + - - + + + + + diff --git a/src/main/java/ch/hearc/ig/odi/stringcalculatortdd/StringCalculator.java b/src/main/java/ch/hearc/ig/odi/stringcalculatortdd/StringCalculator.java index 33c3036..3f17c67 100644 --- a/src/main/java/ch/hearc/ig/odi/stringcalculatortdd/StringCalculator.java +++ b/src/main/java/ch/hearc/ig/odi/stringcalculatortdd/StringCalculator.java @@ -23,7 +23,7 @@ public int add(final String numbers) { delimiter = this.extractDelimiter(numbers); //"cut" the beginning of the string so that the personalize delimiter is removed numbersUpdated = numbers.substring(numbers.indexOf("\n") + 1); - logger.info("Hello, World!"); + logger.info("Info : delimiter start with // !"); } return add(numbersUpdated, delimiter); } @@ -41,11 +41,11 @@ private int add(final String numbersWithoutDelimiter, final String delimiter) { Integer numberInt = Integer.parseInt(number); if (numberInt < 0) { negativeNumbers.add(numberInt); - logger.fatal("Fatal : chiffre négatif!"); + logger.fatal("Fatal : negative numbers!"); } else if (numberInt <= 1000) { returnValue += numberInt; }else{ - logger.warn("Warn : chiffre plus grand que 1000!"); + logger.warn("Warn : number over 1000"); } } }