Hi,

https://github.com/hwaastad/ApplicationComposerMock.git

Basically what I'm doing is adding a @alternative/@stereotype qualifier in
test sources and when needing to "mock" an injection I just add a:

@module
Beans beans = new Beans();
beans.addAlternativeStereotype(Alpha.class);

In 1.7.2 it's working fine, in 7.0.0 it's not.
I've tried to add beans.setBeanDiscoveryMode("all"); but it does'nt seem to
help at all.

BTW,
to add an alternative implementation for a Stateless during tests, I still
need to name my alternative stateless implementation.

eks:

BusinessBean impl interface

Alternative:

@Alpha (/this is the qualifier)
AlternativeBean(name="BusinessBean") extends BusinessBean {
}

This cant't be right?

br hw






--
View this message in context: 
http://tomee-openejb.979440.n4.nabble.com/ApplicationComposer-alternative-stereotype-mocking-tp4676678.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Reply via email to