Skip to content

Commit

Permalink
Sync tests for practice exercise change (#2527)
Browse files Browse the repository at this point in the history
  • Loading branch information
sanderploegsma authored Oct 25, 2023
1 parent 8d14d53 commit c326013
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
16 changes: 13 additions & 3 deletions exercises/practice/change/.meta/tests.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
1 change: 0 additions & 1 deletion exercises/practice/change/.meta/version

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit c326013

Please sign in to comment.