Natural
Natural copied to clipboard
NPE when using String constant in the cucumber annotation
NPE when using String constant in the cucumber annotation
Example:
public final String PROFILES = "'(admin|mobile)'";
@When(PROFILES + " do something")
duplicate with #50
Duplicate of #50
Flagging for review in next.
This issue has not been updated for a while: marking it as stale.
@rlogiacco I don't think this has anything to do with Natural.
I believe it does: as we are reading the annotations from the source files and without compiling the Natural plugin doesn't see the constant being expanded... This is my best guess ATM
Oh I didn't realize this was how it worked. I assumed annotationValue
would contain the string value. How would this work in the case of groovy step definitions, where you can pass an actual RegExp EG @Given(/^foo$/)
.
:-) I thought you had already a try on this... You contributed heavy modifications to the stepmatcher... Let's check this before we move further with the release ;)
Ah, only the most basic hello-world test. I don't think I've tested this style of syntax specifically. I do know I've written step definitions this way before however, so it was surprising to hear there is a compile time and runtime difference, which makes sense when I think about it. I agree it could use further exploration.
Unfortunatly all my modifications to the step matcher thus far have been entirely superficial. It is still your original system and design. I just wrapped it in a public API that doesn't depend on JDT.