Skip to content

Define a "standard" java 8 API to define steps #830

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

Closed
rmannibucau opened this issue Jan 19, 2015 · 3 comments
Closed

Define a "standard" java 8 API to define steps #830

rmannibucau opened this issue Jan 19, 2015 · 3 comments

Comments

@rmannibucau
Copy link
Contributor

Hi

ATM java 8 uses constructor to define steps. it is broken in several situation - all which needs some init on the glue, ie when you use any kind of "container" lib.

We hit this issue in cukespace and I defined:

public interface Lambda {
    void define();
}

to workaround it

Is it possible to add it in LambdaGlueBase?

Only change is to call this method when creating instances for cucumber.

wdyt?

PS: also note the fact it uses JavaBackend so hardly makes hard to integrate with other framework - cukespace has its own backend and we now need to inherit from java one just for it, maybe introducing a LambdaBackend defining the needed methods could help here as well

FYI here is a test with Lambda: https://github.com/cukespace/cukespace/blob/a4f8e33cec2d34ac43ce004a9fa676082595b780/examples/src/test/java/cucumber/runtime/arquillian/java8/J8Test.java and here is the full diff cukespace/cukespace@a4f8e33

@aslakhellesoy
Copy link
Contributor

Can you send a PR please?

@mpkorstanje
Copy link
Contributor

As discussed in #1117 a LambdaGlueRegistry has been extracted in ab51ea2. This should make it easier for other backends to use lambda glue outside of the constructor.

How other backends do this is left up to those backends.

@lock
Copy link

lock bot commented Oct 24, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants