Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade junit version and minor improvements to coffee shop kata #142

Merged
merged 1 commit into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion calendar-kata-solutions/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

<eclipse-collections.version>11.1.0</eclipse-collections.version>
<threeten-extra.version>1.7.2</threeten-extra.version>
<junit5.version>5.9.3</junit5.version>
<junit5.version>5.10.0</junit5.version>
</properties>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion calendar-kata/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

<eclipse-collections.version>11.1.0</eclipse-collections.version>
<threeten-extra.version>1.7.2</threeten-extra.version>
<junit5.version>5.9.3</junit5.version>
<junit5.version>5.10.0</junit5.version>
</properties>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion code-point-kata-solutions/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<maven.compiler.target>17</maven.compiler.target>

<eclipse-collections.version>11.1.0</eclipse-collections.version>
<junit5.version>5.9.3</junit5.version>
<junit5.version>5.10.0</junit5.version>
</properties>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion code-point-kata/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<maven.compiler.target>17</maven.compiler.target>

<eclipse-collections.version>11.1.0</eclipse-collections.version>
<junit5.version>5.9.3</junit5.version>
<junit5.version>5.10.0</junit5.version>
</properties>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion coffee-shop-kata-solutions/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>20</maven.compiler.source>
<maven.compiler.target>20</maven.compiler.target>
<junit5.version>5.9.3</junit5.version>
<junit5.version>5.10.0</junit5.version>
</properties>

<dependencyManagement>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,15 @@ else if (item instanceof Cookie(CookieType cookieType, boolean warmed))
}

/**
* Create and print drink order
* Return a list of custom strings for the customer's drinks!
* First drink : Hot Americano
* Second drink : Hot Caramel Latte with Almond Milk
* Third drink : Hot Vanilla Macchiato with Whole Milk
* Fourth drink : MATCHA Tea
* <p>
* NOTE: Use interface to create four drinks
* Use the toString() to obtain descriptions of the dinks
* NOTE: This method utilizes sealed classes and permit to define coffee drink types
* (e.g., Americano, Latte, Macchiato) are allowed within a hierarchy.
* However, Tea is not part of this hierarchy.
*/
public List<String> getDrinkForOrder()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,6 @@

package bnymellon.codekatas.coffeeshopkata.beverage;

/**
* Prior to Java 15, a class was either declared as 'final' or left 'open,'
* which meant that the class could be extended infinitely.
* With the introduction of "sealed" classes, it becomes possible to
* establish a controlled hierarchy for extensions.
* Modify the following class to permit only the classes
* Latte, Macchiato, and Americano, while excluding Tea.
*
* <p>
* NOTE: This class hierarchy shows the usage of sealed classes
*/

//TODO Convert to Sealed interface
public sealed interface CoffeeDrink extends Beverage permits Latte, Macchiato, Americano
{
int espressoShot();
Expand Down
2 changes: 1 addition & 1 deletion coffee-shop-kata/jdk21/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>20</maven.compiler.source>
<maven.compiler.target>20</maven.compiler.target>
<junit5.version>5.9.3</junit5.version>
<junit5.version>5.10.0</junit5.version>
</properties>

<dependencyManagement>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

public class CoffeeShopOrder
{

private final String customerName;
private final List<Item> orderItems;

Expand Down Expand Up @@ -67,17 +66,19 @@ public String generateReceipt() {
}

/**
* Create and print drink order
* Return a list of custom strings for the customer's drinks!
* First drink : Hot Americano
* Second drink : Hot Caramel Latte with Almond Milk
* Third drink : Hot Vanilla Macchiato with Whole Milk
* Fourth drink : MATCHA Tea
* <p>
* NOTE: Use interface to create four drinks
* NOTE: This method utilize sealed classes and permit to define coffee drink types
* (e.g., Americano, Latte, Macchiato) are allowed within a hierarchy.
* However, Tea is not part of this hierarchy.
*/
public List<String> getDrinkForOrder()
{
// TODO implement method
// TODO implement method logic here
return null;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
* Modify the following class to permit only the classes
* Latte, Macchiato, and Americano, while excluding Tea.
*
* <p>
* NOTE: This class hierarchy shows the usage of sealed classes
* @see <a href="https://openjdk.org/jeps/395">...</a>
*/

//TODO Convert to Sealed interface
// TODO: Convert to Sealed interface
public interface CoffeeDrink extends Beverage
{
int espressoShot();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,15 @@
import java.util.Objects;

/**
* TODO: convert class to record
* Replace the entire class with a Record.
* This replaces the need for a constructor, getters, toString(),
* equals() and hashcode() method
* NOTE: This example highlights the usage of a record to replace the
* boilerplate of a plain Java class.
*
* @see <a href="https://openjdk.org/jeps/395">...</a>
*/
// TODO: convert class to record
public class Bagel implements BakeryItem
{
private final BagelType bagelType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,15 @@
import java.util.Objects;

/**
* TODO: convert class to record
* Replace the entire class with a Record.
* This replaces the need for a constructor, getters, toString(),
* equals() and hashcode() method
* NOTE: This example highlights the usage of a record to replace the
* boilerplate of a plain Java class.
*
* @see <a href="https://openjdk.org/jeps/395">...</a>
*/
// TODO: convert class to record
public class Cookie implements BakeryItem
{
private final CookieType cookieType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,15 @@
import java.util.Objects;

/**
* TODO: convert class to record
* Replace the entire class with a Record.
* This replaces the need for a constructor, getters, toString(),
* equals() and hashcode() method
* NOTE: This example highlights the usage of a record to replace the
* boilerplate of a plain Java class.
*
* @see <a href="https://openjdk.org/jeps/395">...</a>
*/
// TODO: convert class to record
public class Donut implements BakeryItem
{
private final DonutType donutType;
Expand Down
2 changes: 1 addition & 1 deletion coffee-shop-kata/jdk8/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<junit5.version>5.9.3</junit5.version>
<junit5.version>5.10.0</junit5.version>
</properties>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright 2023 The Bank of New York Mellon.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package bnymellon.codekatas.coffeeshopkata;

import bnymellon.codekatas.coffeeshopkata.beverage.Americano;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ public void testDonutGetters()
assertEquals(donut1.getDonutType(), GLAZED);
}


@Test
public void getDrinkItems()
{
Expand Down
2 changes: 1 addition & 1 deletion deck-of-cards-kata-solutions/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<eclipse-collections.version>11.1.0</eclipse-collections.version>
<guava.version>32.1.1-jre</guava.version>
<vavr.version>0.10.4</vavr.version>
<junit5.version>5.9.3</junit5.version>
<junit5.version>5.10.0</junit5.version>

<checkstyle.version>10.1</checkstyle.version>
<checkstyle.plugin.version>3.1.2</checkstyle.plugin.version>
Expand Down
2 changes: 1 addition & 1 deletion deck-of-cards-kata/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<eclipse-collections.version>11.1.0</eclipse-collections.version>
<guava.version>32.1.1-jre</guava.version>
<vavr.version>0.10.4</vavr.version>
<junit5.version>5.9.3</junit5.version>
<junit5.version>5.10.0</junit5.version>
</properties>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion donut-kata-solutions/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<kotlin.version>1.9.0</kotlin.version>

<eclipse-collections.version>11.1.0</eclipse-collections.version>
<junit5.version>5.9.3</junit5.version>
<junit5.version>5.10.0</junit5.version>
</properties>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion donut-kata/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<kotlin.version>1.9.0</kotlin.version>

<eclipse-collections.version>11.1.0</eclipse-collections.version>
<junit5.version>5.9.3</junit5.version>
<junit5.version>5.10.0</junit5.version>
</properties>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion java-lambda-kata-solutions/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<maven.compiler.target>17</maven.compiler.target>

<eclipse-collections.version>11.1.0</eclipse-collections.version>
<junit5.version>5.9.3</junit5.version>
<junit5.version>5.10.0</junit5.version>
</properties>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion java-lambda-kata/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<maven.compiler.target>17</maven.compiler.target>

<eclipse-collections.version>11.1.0</eclipse-collections.version>
<junit5.version>5.9.3</junit5.version>
<junit5.version>5.10.0</junit5.version>
</properties>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion jmh-kata/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

<eclipse-collections.version>11.1.0</eclipse-collections.version>
<jmh.version>1.36</jmh.version>
<junit5.version>5.9.3</junit5.version>
<junit5.version>5.10.0</junit5.version>
</properties>

<build>
Expand Down
2 changes: 1 addition & 1 deletion kata-of-katas-solutions/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<maven.compiler.target>17</maven.compiler.target>

<eclipse-collections.version>11.1.0</eclipse-collections.version>
<junit5.version>5.9.3</junit5.version>
<junit5.version>5.10.0</junit5.version>
</properties>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion kata-of-katas/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<maven.compiler.target>17</maven.compiler.target>

<eclipse-collections.version>11.1.0</eclipse-collections.version>
<junit5.version>5.9.3</junit5.version>
<junit5.version>5.10.0</junit5.version>
</properties>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion pitest-mutation-kata-solutions/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<maven.compiler.target>17</maven.compiler.target>

<eclipse-collections.version>11.1.0</eclipse-collections.version>
<junit5.version>5.9.3</junit5.version>
<junit5.version>5.10.0</junit5.version>
<maven-surefire-plugin.version>2.22.2</maven-surefire-plugin.version>
<pitest-maven.version>1.14.2</pitest-maven.version>
</properties>
Expand Down
2 changes: 1 addition & 1 deletion pitest-mutation-kata/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<maven.compiler.target>17</maven.compiler.target>

<eclipse-collections.version>11.1.0</eclipse-collections.version>
<junit5.version>5.9.3</junit5.version>
<junit5.version>5.10.0</junit5.version>
<maven-surefire-plugin.version>2.22.2</maven-surefire-plugin.version>
<pitest-maven.version>1.14.2</pitest-maven.version>
</properties>
Expand Down
Loading