Unit testing with CDI

2015-07-27 Thread Andrea Del Bene
Hi folks,

I'm trying to put together a minimal quickstart project illustrating how to
use CDI in Wicket. I followed the code from the CDI example I was able to
create a working application. The only problem I still facing is about unit
testing.
What should I do to write a test case for my application?
I'm still getting a BeanManager not found error. I guess I have to
configure something in the servlet context but I can't figure out what.

Any idea?

PS: the code is here
https://github.com/bitstorm/WicketExperiments/tree/master/cdi-example


Re: Unit testing with CDI

2015-07-27 Thread Andrea Del Bene
ok, I'll give it a try. Thank you !
On 27 Jul 2015 18:35, Martin Grigorov mgrigo...@apache.org wrote:

 Hi,

 Master branch has some unit tests that use cdi-unit 2.x library.
 Can you use them as starting point?
 On Jul 27, 2015 6:28 PM, Andrea Del Bene an.delb...@gmail.com wrote:

  Hi folks,
 
  I'm trying to put together a minimal quickstart project illustrating how
 to
  use CDI in Wicket. I followed the code from the CDI example I was able to
  create a working application. The only problem I still facing is about
 unit
  testing.
  What should I do to write a test case for my application?
  I'm still getting a BeanManager not found error. I guess I have to
  configure something in the servlet context but I can't figure out what.
 
  Any idea?
 
  PS: the code is here
  https://github.com/bitstorm/WicketExperiments/tree/master/cdi-example
 



Re: Unit testing with CDI

2015-07-27 Thread Martin Grigorov
Hi,

Master branch has some unit tests that use cdi-unit 2.x library.
Can you use them as starting point?
On Jul 27, 2015 6:28 PM, Andrea Del Bene an.delb...@gmail.com wrote:

 Hi folks,

 I'm trying to put together a minimal quickstart project illustrating how to
 use CDI in Wicket. I followed the code from the CDI example I was able to
 create a working application. The only problem I still facing is about unit
 testing.
 What should I do to write a test case for my application?
 I'm still getting a BeanManager not found error. I guess I have to
 configure something in the servlet context but I can't figure out what.

 Any idea?

 PS: the code is here
 https://github.com/bitstorm/WicketExperiments/tree/master/cdi-example