hooks should not require public visibility -- at least should log an error/warning
See original GitHub issueIs your feature request related to a problem? Please describe. I was frustrated when i tried to figure out why my tests would fail. Until i notices that my setup was not public. From the old days in junit i know that they used to require that too, but no more and nowadays it’s so common to have all that test stuff with package visibility (to avoid cluttering autocompletion in IDEs i guess) I just did it here too w/o even giving it a 2nd though.
So now my code looks like so to make my team mates (we are all new CC) aware of the fact.
@Before //method must be public!! otherwise it's silently ignored!
public void setUp() {
msUniteTestHarness.reset();
}
Describe the solution you’d like Also allow package visibility but by all means don’t just silently drop the execution
Describe alternatives you’ve considered Throwing an error would be OK too but behavior is not anymore in alignment with junit.
Issue Analytics
- State:
- Created 2 years ago
- Comments:14 (8 by maintainers)
Top GitHub Comments
Step definitions and hooks that would previously be ignored would now be discovered. Even though this may not have been intentional, it would change an existing setup.
We would still have to scan the super class. Just to let users know they made a mistake.
JUnit for example does allow inheritance -it makes sense there- and that assumption is carried over to Cucumber where it does not make sense.