you are right,
adding stereotypes programmatically now needs some "too much" knowledge on
tomee, added it: https://issues.apache.org/jira/browse/TOMEE-1652
Here is you 7.x test:
@RunWith(ApplicationComposer.class)
@Classes(cdiStereotypes = Alpha.class, value = {
BusinessBean.class, MockSmsBean.class, Sms.class, ProductionSms.class,
Shopping.class, MockShoppingBean.class, ProductionShopping.class
})
public class BusinessBeanMockTest {
@Inject
private BusinessBean businessBean;
@Test
public void testDoSomething() throws Exception {
assertEquals("ProductionSms: doStuff Alpha",
businessBean.doSomething());
}
@Test
public void testShopping() throws Exception {
assertEquals("ProductionShopping: doStuff Alpha",
businessBean.doShopping());
}
}
Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> | Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com>
2015-11-03 6:38 GMT-08:00 hwaastad <[email protected]>:
> Hi,
> there's a BusinessBeanMockTest in the project which will fail using profile
> 7.0.0 but is OK in profile 1.7.2.
>
> BTW,
> most current branch is develop......
>
> br hw
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/ApplicationComposer-alternative-stereotype-mocking-tp4676678p4676710.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>