Can SwitchYardTestKit be used to test EJBs, or can Arquillian test SwitchYard Services?
Issue
- Beans are annotated to be both SwitchYard Services and EJBs. Can
SwitchYardTestKitbe used to test both aspects? Can Arquillian? - We wrote unit tests for a SwitchYard project using
SwithYardRunner, but a remote EJB reference does not get initialised by the framework (we are using an@EJBannotation) and we cannot get hold of the SwitchYard bean instance to manually set a mock.
@Service(SampleService.class)
public class SampleServiceImpl implements SampleService {
@EJB(lookup = "...")
private AnotherRemoteService reemoteService;
- How are unit tests written in this situation?
Environment
- Red Hat JBoss Fuse Service Works (FSW)
- 6.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
