-
Notifications
You must be signed in to change notification settings - Fork 30
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
AbstractBuilder doesn't provide ability to add alternatives as well as beans #22
Comments
Hello, such method is already present on
Is this what you were looking for? |
It is close. In your case combination is : ALTERNATIVES + CLASSES. |
@goodidea-kp Well, Matej is correct that Do you want to add and select an alternative mock bean using
We should improve this and allow to specify the bean class in |
I am not sure I fully grasp what you are after - whether the question is how to compose |
@manovotn your proposed solution is what I am looking for. |
- also add convenient MockBean.Builder.selectedAlternative() - resolves weld#22
@goodidea-kp The problem is we're working with several builders at once: In any case, this proposal adds a convenient |
@goodidea-kp Yes, makes sense, but we also need to avoid duplicating code and we are basically making a builder (WeldInitiator.Builder) on top of a builder (Weld) which can possibly use optional builder (MockBean.Builder)... So this was the best we could come up with as first version, we should give it some more thoughts though. |
agreed. |
Snapshot builds aren't automatically pushed to maven central, you will have to stick to your own build or wait for next release (which isn't yet scheduled). |
- also add convenient MockBean.Builder.selectedAlternative() - resolves weld#22
- also add convenient MockBean.Builder.selectedAlternative() - resolves weld#22
- also add convenient MockBean.Builder.selectedAlternative() - resolves #22
I suggest to add this method:
public T addAlternatives(Class<?>... clz) { for(Class cl:clz){ weld.addAlternative(cl); } return self(); }
The text was updated successfully, but these errors were encountered: