Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Core] Remove deprecated TypeRegistryConfigurer #2356

Merged
merged 1 commit into from
Aug 10, 2021

Conversation

mpkorstanje
Copy link
Contributor

@mpkorstanje mpkorstanje commented Aug 10, 2021

Prefer using the annotation based method of providing parameters instead.
For example:

Feature: Parameter Types

  Scenario: flights
    Given LHR-CDG has been delayed 45 minutes
    @Given("{flight} has been delayed {int} minutes")
    public void lhrCDGHasBeenDelayedMinutes(Flight flight, int delay) {
        assertEquals("LHR", flight.from);
        assertEquals("CDG", flight.to);
        assertEquals(45, delay);
    }

    @ParameterType(value = "([A-Z]{3})-([A-Z]{3})", useForSnippets = true)
    public Flight flight(String from, String to) {
        return new Flight(from, to);
    }

Prefer using the annotation based method of providing parameters instead.
For example:

```gherkin
Feature: Parameter Types

  Scenario: flights
    Given LHR-CDG has been delayed 45 minutes
```

```java

    @given("{flight} has been delayed {int} minutes")
    public void lhrCDGHasBeenDelayedMinutes(Flight flight, int delay) {
        assertEquals("LHR", flight.from);
        assertEquals("CDG", flight.to);
        assertEquals(45, delay);
    }

    @ParameterType(value = "([A-Z]{3})-([A-Z]{3})", useForSnippets = true)
    public Flight flight(String from, String to) {
        return new Flight(from, to);
    }
```
@codecov
Copy link

codecov bot commented Aug 10, 2021

Codecov Report

Merging #2356 (acea42d) into v7.x.x (2fcd4b1) will increase coverage by 0.09%.
The diff coverage is 85.71%.

Impacted file tree graph

@@             Coverage Diff              @@
##             v7.x.x    #2356      +/-   ##
============================================
+ Coverage     83.14%   83.23%   +0.09%     
+ Complexity     2295     2291       -4     
============================================
  Files           292      290       -2     
  Lines          8270     8213      -57     
  Branches        739      732       -7     
============================================
- Hits           6876     6836      -40     
+ Misses         1105     1093      -12     
+ Partials        289      284       -5     
Impacted Files Coverage Δ
...cucumber/core/runtime/SingletonRunnerSupplier.java 100.00% <ø> (ø)
...cumber/core/runtime/ThreadLocalRunnerSupplier.java 100.00% <ø> (ø)
...unit/src/main/java/io/cucumber/junit/Cucumber.java 100.00% <ø> (ø)
.../java/io/cucumber/testng/TestNGCucumberRunner.java 96.49% <ø> (-0.07%) ⬇️
...latform/engine/CucumberEngineExecutionContext.java 85.36% <50.00%> (-0.35%) ⬇️
.../src/main/java/io/cucumber/core/runner/Runner.java 91.26% <100.00%> (-0.33%) ⬇️
...rc/main/java/io/cucumber/core/runtime/Runtime.java 92.38% <100.00%> (-0.08%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2fcd4b1...acea42d. Read the comment docs.

@mpkorstanje mpkorstanje merged commit 9a9baa0 into v7.x.x Aug 10, 2021
@mpkorstanje mpkorstanje deleted the remove-deprecated-parameter-type-registry branch August 10, 2021 19:38
@mpkorstanje mpkorstanje added this to the v7.0.0 milestone Aug 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant