Skip to content
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: 2 additions & 0 deletions exercises/practice/largest-series-product/.meta/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ include = false

[6cf66098-a6af-4223-aab1-26aeeefc7402]
description = "rejects empty string and nonzero span"
include = false
reimplements = "6d96c691-4374-4404-80ee-2ea8f3613dd4"

[7a38f2d6-3c35-45f6-8d6f-12e6e32d4d74]
Expand All @@ -69,4 +70,5 @@ include = false

[c859f34a-9bfe-4897-9c2f-6d7f8598e7f0]
description = "rejects negative span"
include = false
reimplements = "5fe3c0e5-a945-49f2-b584-f0814b4dd1ef"
Original file line number Diff line number Diff line change
Expand Up @@ -127,17 +127,6 @@ public void testSeriesLengthLongerThanLengthOfStringToTestIsRejected() {
.withMessage("Series length must be less than or equal to the length of the string to search.");
}

@Disabled("Remove to run test")
@Test
@DisplayName("rejects empty string and nonzero span")
public void testEmptyStringAndNonZeroSpanIsRejected() {
LargestSeriesProductCalculator calculator = new LargestSeriesProductCalculator("");

assertThatExceptionOfType(IllegalArgumentException.class)
.isThrownBy(() -> calculator.calculateLargestProductForSeriesLength(1))
.withMessage("Series length must be less than or equal to the length of the string to search.");
}

@Disabled("Remove to run test")
@Test
@DisplayName("rejects invalid character in digits")
Expand All @@ -147,17 +136,6 @@ public void testStringToSearchContainingNonDigitCharacterIsRejected() {
.withMessage("String to search may only contain digits.");
}

@Disabled("Remove to run test")
@Test
@DisplayName("rejects negative span")
public void testNegativeSeriesLengthIsRejected() {
LargestSeriesProductCalculator calculator = new LargestSeriesProductCalculator("12345");

assertThatExceptionOfType(IllegalArgumentException.class)
.isThrownBy(() -> calculator.calculateLargestProductForSeriesLength(-1))
.withMessage("Series length must be non-negative.");
}

@Disabled("Remove to run test")
@Test
@DisplayName("integer overflow")
Expand All @@ -169,5 +147,4 @@ public void testForIntegerOverflow() {

assertThat(actualProduct).isEqualTo(expectedProduct);
}

}