0

I'm running my .ear in container running arquillian. I'm testing some communication with external system, so I have created simulator for that system.

I want to be able to check the format of passed messages. How should I do it?

Should I put asserts into the simulator or is there a way in arquillian how can I spy on some class? Or replace some specific class with mock class which can play the role as simulator.

There are no EJB nor CDI injection. It is just some reqular class, which I cannot set manually. Any ideas.

Zveratko
  • 2,663
  • 6
  • 35
  • 64

1 Answers1

0

You cannot spy on classes with arquillian and as far as I know you cannot use mocking with arquillian. But if you are not using EJB/CDI injection why do you use arquillian ? I would use JUnit and Mockito/Powermockito ...

MeBNoah
  • 165
  • 14
  • It is more for integration testing and sometimes it can be handy to assert the behavior somewhere in middle of the code. Especially if the code is not fully unit covered. – Zveratko Oct 13 '15 at 04:58