Skip to content

Commit c326013

Browse files
Sync tests for practice exercise change (#2527)
1 parent 8d14d53 commit c326013

File tree

3 files changed

+22
-4
lines changed

3 files changed

+22
-4
lines changed

exercises/practice/change/.meta/tests.toml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
1-
# This is an auto-generated file. Regular comments will be removed when this
2-
# file is regenerated. Regenerating will not touch any manually added keys,
3-
# so comments can be added in a "comment" key.
1+
# This is an auto-generated file.
2+
#
3+
# Regenerating this file via `configlet sync` will:
4+
# - Recreate every `description` key/value pair
5+
# - Recreate every `reimplements` key/value pair, where they exist in problem-specifications
6+
# - Remove any `include = true` key/value pair (an omitted `include` key implies inclusion)
7+
# - Preserve any other key/value pair
8+
#
9+
# As user-added comments (using the # character) will be removed when this file
10+
# is regenerated, comments can be added via a `comment` key.
11+
12+
[d0ebd0e1-9d27-4609-a654-df5c0ba1d83a]
13+
description = "change for 1 cent"
414

515
[36887bea-7f92-4a9c-b0cc-c0e886b3ecc8]
616
description = "single coin change"

exercises/practice/change/.meta/version

Lines changed: 0 additions & 1 deletion
This file was deleted.

exercises/practice/change/src/test/java/ChangeCalculatorTest.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@
77

88
public class ChangeCalculatorTest {
99

10+
@Test
11+
public void testChangeFor1Cent() {
12+
ChangeCalculator changeCalculator = new ChangeCalculator(asList(1, 5, 10, 25));
13+
14+
assertThat(changeCalculator.computeMostEfficientChange(1))
15+
.containsExactly(1);
16+
}
17+
18+
@Ignore("Remove to run test")
1019
@Test
1120
public void testChangeThatCanBeGivenInASingleCoin() {
1221
ChangeCalculator changeCalculator = new ChangeCalculator(asList(1, 5, 10, 25, 100));

0 commit comments

Comments
 (0)