0 Replies Latest reply on Dec 20, 2013 2:18 PM by michael melsen

    Arquillian rest extension and mockito

    michael melsen Newbie

      Hi guys,

       

      Hope you can help me out with something I've been struggling with for some time now. I'm using arquillian for my integrating testing and it works very nice. So I thought instead of testing my persistence layer I wanted to isolate my rest services layer to test it also. This time using arquillian, the arquillian rest extension which sounds perfect for black box testing of my services layer and combine this with mockito. I want to mock the beans that get injected in the service layers in order to decouple it and not having to add all kinds of classes and dependencies to the deployment.

       

      IT got me so far that I can test my rest service using the arquillian restextension but i'm unable to mock the cdi beans in my rest service class. Any idea how this can be achieved?

       

      i've also looked at the autodiscover arquillian extension but have no clue what to do or configure in order to let the mocks work in my project

       

      hope you guys can help me out

       

      regards

       

      michael