From 27a6c7a423fc7793675b45b8f428cdc487cffea3 Mon Sep 17 00:00:00 2001 From: josdem Date: Thu, 11 Apr 2024 09:47:22 -0400 Subject: [PATCH] Updating Gradle and Junit versions --- simple-algorithms/counting-uppercase/build.gradle | 4 ++-- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../main/java/com/jos/dem/kata/UppercaseCounter.java | 12 ------------ .../main/java/com/josdem/kata/UppercaseCounter.java | 12 ++++++++++++ .../dem => josdem}/kata/CountingUppercaseTest.java | 4 ++-- 5 files changed, 17 insertions(+), 17 deletions(-) delete mode 100644 simple-algorithms/counting-uppercase/src/main/java/com/jos/dem/kata/UppercaseCounter.java create mode 100644 simple-algorithms/counting-uppercase/src/main/java/com/josdem/kata/UppercaseCounter.java rename simple-algorithms/counting-uppercase/src/test/java/com/{jos/dem => josdem}/kata/CountingUppercaseTest.java (91%) diff --git a/simple-algorithms/counting-uppercase/build.gradle b/simple-algorithms/counting-uppercase/build.gradle index 968b5f0..9f5b988 100644 --- a/simple-algorithms/counting-uppercase/build.gradle +++ b/simple-algorithms/counting-uppercase/build.gradle @@ -2,9 +2,9 @@ plugins { id 'java' } -def junitJupiterVersion = '5.7.0' +def junitJupiterVersion = '5.10.2' -group 'com.jos.dem.kata' +group 'com.josdem.kata' version '1.0-SNAPSHOT' repositories { diff --git a/simple-algorithms/counting-uppercase/gradle/wrapper/gradle-wrapper.properties b/simple-algorithms/counting-uppercase/gradle/wrapper/gradle-wrapper.properties index 69a9715..a595206 100644 --- a/simple-algorithms/counting-uppercase/gradle/wrapper/gradle-wrapper.properties +++ b/simple-algorithms/counting-uppercase/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/simple-algorithms/counting-uppercase/src/main/java/com/jos/dem/kata/UppercaseCounter.java b/simple-algorithms/counting-uppercase/src/main/java/com/jos/dem/kata/UppercaseCounter.java deleted file mode 100644 index b554fb9..0000000 --- a/simple-algorithms/counting-uppercase/src/main/java/com/jos/dem/kata/UppercaseCounter.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.jos.dem.kata; - -public class UppercaseCounter { - - public int count(String message) { - return (int) message.chars().filter(it -> it >= 65 && it <= 90).count(); - } - - public boolean hasSpace(String message) { - return message.contains(" "); - } -} diff --git a/simple-algorithms/counting-uppercase/src/main/java/com/josdem/kata/UppercaseCounter.java b/simple-algorithms/counting-uppercase/src/main/java/com/josdem/kata/UppercaseCounter.java new file mode 100644 index 0000000..f029f82 --- /dev/null +++ b/simple-algorithms/counting-uppercase/src/main/java/com/josdem/kata/UppercaseCounter.java @@ -0,0 +1,12 @@ +package com.josdem.kata; + +public class UppercaseCounter { + + public int count(String message) { + return message.length(); + } + + public boolean hasSpace(String message) { + return message.isEmpty(); + } +} diff --git a/simple-algorithms/counting-uppercase/src/test/java/com/jos/dem/kata/CountingUppercaseTest.java b/simple-algorithms/counting-uppercase/src/test/java/com/josdem/kata/CountingUppercaseTest.java similarity index 91% rename from simple-algorithms/counting-uppercase/src/test/java/com/jos/dem/kata/CountingUppercaseTest.java rename to simple-algorithms/counting-uppercase/src/test/java/com/josdem/kata/CountingUppercaseTest.java index abdcde1..f80a265 100644 --- a/simple-algorithms/counting-uppercase/src/test/java/com/jos/dem/kata/CountingUppercaseTest.java +++ b/simple-algorithms/counting-uppercase/src/test/java/com/josdem/kata/CountingUppercaseTest.java @@ -1,4 +1,4 @@ -package com.jos.dem.kata; +package com.josdem.kata; /** * Given A string @@ -14,7 +14,7 @@ class CountingUppercaseTest { - private UppercaseCounter uppercaseCounter = new UppercaseCounter(); + private final UppercaseCounter uppercaseCounter = new UppercaseCounter(); @Test @DisplayName("count three uppercase")