I guess I must be doing something wrong here:
Maybe the inject rule?

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

@ClassRule
    public static final EJBContainerRule CONTAINER_RULE = new
EJBContainerRule();
    @Rule
    public final InjectRule injectRule = new InjectRule(this,
CONTAINER_RULE);

    @EJB
    private HelloBeanLocal helloBeanLocal;


@Properties({
    @Property(key =
"org.apache.openejb.injection.FallbackPropertyInjector",value =
"org.apache.openejb.mockito.MockitoInjector")
})

@Mock
    private TestBeanLocal mockTestBean;

@Before
    public void setUp() {
        MockitoAnnotations.initMocks(this);
    }

 @Test
    public void testSayHello() throws Exception {
        Mockito.when(mockTestBean.doTest()).thenReturn("ompalompa");
        helloBeanLocal.sayHello();
    }

But mocking is not working.

No hurry here, i just wanted to implement parts of your blog :-)

br hw




--
View this message in context: 
http://openejb.979440.n4.nabble.com/OpenEJB-TomEE-and-mocking-tp4669665p4669670.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Reply via email to