From 582ce47f870e51fcef57b017b333d18e084bd326 Mon Sep 17 00:00:00 2001 From: Sander Ploegsma Date: Sun, 22 Oct 2023 19:41:40 +0200 Subject: [PATCH] Sync tests for practice exercise `change` --- exercises/practice/change/.meta/tests.toml | 16 +++++++++++++--- exercises/practice/change/.meta/version | 1 - .../src/test/java/ChangeCalculatorTest.java | 9 +++++++++ 3 files changed, 22 insertions(+), 4 deletions(-) delete mode 100644 exercises/practice/change/.meta/version diff --git a/exercises/practice/change/.meta/tests.toml b/exercises/practice/change/.meta/tests.toml index 6d36d3c76..d2cf3ed90 100644 --- a/exercises/practice/change/.meta/tests.toml +++ b/exercises/practice/change/.meta/tests.toml @@ -1,6 +1,16 @@ -# This is an auto-generated file. Regular comments will be removed when this -# file is regenerated. Regenerating will not touch any manually added keys, -# so comments can be added in a "comment" key. +# This is an auto-generated file. +# +# Regenerating this file via `configlet sync` will: +# - Recreate every `description` key/value pair +# - Recreate every `reimplements` key/value pair, where they exist in problem-specifications +# - Remove any `include = true` key/value pair (an omitted `include` key implies inclusion) +# - Preserve any other key/value pair +# +# As user-added comments (using the # character) will be removed when this file +# is regenerated, comments can be added via a `comment` key. + +[d0ebd0e1-9d27-4609-a654-df5c0ba1d83a] +description = "change for 1 cent" [36887bea-7f92-4a9c-b0cc-c0e886b3ecc8] description = "single coin change" diff --git a/exercises/practice/change/.meta/version b/exercises/practice/change/.meta/version deleted file mode 100644 index f0bb29e76..000000000 --- a/exercises/practice/change/.meta/version +++ /dev/null @@ -1 +0,0 @@ -1.3.0 diff --git a/exercises/practice/change/src/test/java/ChangeCalculatorTest.java b/exercises/practice/change/src/test/java/ChangeCalculatorTest.java index 8e70a8def..09f1b7d87 100644 --- a/exercises/practice/change/src/test/java/ChangeCalculatorTest.java +++ b/exercises/practice/change/src/test/java/ChangeCalculatorTest.java @@ -7,6 +7,15 @@ public class ChangeCalculatorTest { + @Test + public void testChangeFor1Cent() { + ChangeCalculator changeCalculator = new ChangeCalculator(asList(1, 5, 10, 25)); + + assertThat(changeCalculator.computeMostEfficientChange(1)) + .containsExactly(1); + } + + @Ignore("Remove to run test") @Test public void testChangeThatCanBeGivenInASingleCoin() { ChangeCalculator changeCalculator = new ChangeCalculator(asList(1, 5, 10, 25, 100));