Skip to content

Commit

Permalink
refactor: MR review
Browse files Browse the repository at this point in the history
  • Loading branch information
deblockt committed Jul 22, 2024
1 parent 6c557ab commit d420c71
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed
- [Core] Enhanced stack trace to include step location for better debugging in case of datatable conversion errors ([#2908](https://github.com/cucumber/cucumber-jvm/pull/2908) Thomas Deblock)

## [7.18.1] - 2024-07-18
### Changed
- [Core] Include parameterized scenario name in JUnit and TestNG XML report
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

import java.lang.reflect.InvocationTargetException;
import java.net.URI;
import java.net.URISyntaxException;
import java.time.Clock;
import java.util.Collections;
import java.util.List;
Expand Down Expand Up @@ -237,7 +236,7 @@ void throws_could_not_convert_exception_for_transformer_and_capture_group_mismat
}

@Test
void rethrows_target_invocation_exceptions_from_parameter_type() throws URISyntaxException {
void rethrows_target_invocation_exceptions_from_parameter_type() {
RuntimeException userException = new RuntimeException();

stepTypeRegistry.defineParameterType(new ParameterType<>(
Expand All @@ -259,7 +258,7 @@ void rethrows_target_invocation_exceptions_from_parameter_type() throws URISynta
CoreStepDefinition coreStepDefinition = new CoreStepDefinition(id, stepDefinition, expression);
List<Argument> arguments = coreStepDefinition.matchedArguments(step);
StepDefinitionMatch stepDefinitionMatch = new PickleStepDefinitionMatch(arguments, stepDefinition,
new URI("test.feature"), step);
URI.create("test.feature"), step);

Executable testMethod = () -> stepDefinitionMatch.runStep(null);
RuntimeException actualThrown = assertThrows(RuntimeException.class, testMethod);
Expand Down Expand Up @@ -295,7 +294,7 @@ void throws_could_not_convert_exception_for_singleton_table_dimension_mismatch()
}

@Test
void rethrows_target_invocation_exceptions_from_data_table() throws URISyntaxException {
void rethrows_target_invocation_exceptions_from_data_table() {
Feature feature = TestFeatureParser.parse("" +
"Feature: Test feature\n" +
" Scenario: Test scenario\n" +
Expand All @@ -318,7 +317,7 @@ void rethrows_target_invocation_exceptions_from_data_table() throws URISyntaxExc
CoreStepDefinition coreStepDefinition = new CoreStepDefinition(id, stepDefinition, expression);
List<Argument> arguments = coreStepDefinition.matchedArguments(step);
StepDefinitionMatch stepDefinitionMatch = new PickleStepDefinitionMatch(arguments, stepDefinition,
new URI("test.feature"), step);
URI.create("test.feature"), step);

Executable testMethod = () -> stepDefinitionMatch.runStep(null);
RuntimeException actualThrown = assertThrows(RuntimeException.class, testMethod);
Expand Down Expand Up @@ -356,7 +355,7 @@ void throws_could_not_convert_exception_for_docstring() {
}

@Test
void rethrows_target_invocation_exception_for_docstring() throws URISyntaxException {
void rethrows_target_invocation_exception_for_docstring() {
RuntimeException userException = new RuntimeException();

Feature feature = TestFeatureParser.parse("" +
Expand All @@ -377,7 +376,7 @@ void rethrows_target_invocation_exception_for_docstring() throws URISyntaxExcept
CoreStepDefinition coreStepDefinition = new CoreStepDefinition(id, stepDefinition, expression);
List<Argument> arguments = coreStepDefinition.matchedArguments(step);
StepDefinitionMatch stepDefinitionMatch = new PickleStepDefinitionMatch(arguments, stepDefinition,
new URI("test.feature"), step);
URI.create("test.feature"), step);

Executable testMethod = () -> stepDefinitionMatch.runStep(null);
RuntimeException actualThrown = assertThrows(RuntimeException.class, testMethod);
Expand Down

0 comments on commit d420c71

Please sign in to comment.