cucumber-jvm icon indicating copy to clipboard operation
cucumber-jvm copied to clipboard

[Java] Define step definitions and hooks with minimal ceremony

Open rozenshteyn opened this issue 3 years ago • 3 comments

Is your pull request related to a problem? Please describe.

[Java] Allow non-private classes to contain hooks and allow hook annotations in non-public methods (#2370)

Describe the solution you have implemented

  1. When scanning methods of a class, allow the class to have package-private and protected visibility in addition to the previously allowed public visibility.
  2. When scanning methods of a class, allow the hook-annotated methods to have package-private and protected visibility in addition to the previously allowed public visibility.

Additional context None.

rozenshteyn avatar Nov 07 '21 17:11 rozenshteyn

Wow. I'll have to find some time to review this. It is likely that I won't have any in the next two weeks.

mpkorstanje avatar Nov 07 '21 19:11 mpkorstanje

Codecov Report

Merging #2415 (91f48b2) into main (04281f2) will decrease coverage by 0.04%. The diff coverage is 64.28%.

:exclamation: Current head 91f48b2 differs from pull request most recent head 0158029. Consider uploading reports for the commit 0158029 to get more accurate results Impacted file tree graph

@@             Coverage Diff              @@
##               main    #2415      +/-   ##
============================================
- Coverage     83.64%   83.60%   -0.05%     
+ Complexity     2677     2641      -36     
============================================
  Files           319      317       -2     
  Lines          9441     9325     -116     
  Branches        918      908      -10     
============================================
- Hits           7897     7796     -101     
+ Misses         1204     1195       -9     
+ Partials        340      334       -6     
Impacted Files Coverage Δ
.../src/main/java/io/cucumber/java/MethodScanner.java 81.25% <64.28%> (-1.11%) :arrow_down:
.../io/cucumber/java/JavaDocStringTypeDefinition.java 90.90% <0.00%> (-9.10%) :arrow_down:
.../src/main/java/io/cucumber/guice/GuiceFactory.java 90.90% <0.00%> (-1.95%) :arrow_down:
...latform/engine/CucumberEngineExecutionContext.java 85.36% <0.00%> (-1.31%) :arrow_down:
...main/java/io/cucumber/core/options/CurlOption.java 94.23% <0.00%> (-0.65%) :arrow_down:
...java/io/cucumber/core/plugin/PublishFormatter.java 0.00% <0.00%> (ø)
...o/cucumber/core/stepexpression/StepExpression.java 100.00% <0.00%> (ø)
...a/io/cucumber/docstring/DocStringTypeRegistry.java 100.00% <0.00%> (ø)
...ucumber/core/stepexpression/DocStringArgument.java 85.71% <0.00%> (ø)
...tring/DocStringTypeRegistryDocStringConverter.java 100.00% <0.00%> (ø)
... and 6 more

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 04281f2...0158029. Read the comment docs.

codecov[bot] avatar Nov 07 '21 19:11 codecov[bot]

Note to self: Drop 0158029 before merging. Looks like it was an attempted fix for a different issue.

mpkorstanje avatar Apr 10 '22 14:04 mpkorstanje