File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Testing and the fly likes JUnit integration with EJB and Spring Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Testing
Bookmark "JUnit integration with EJB and Spring" Watch "JUnit integration with EJB and Spring" New topic
Author

JUnit integration with EJB and Spring

Arun Vasu
Greenhorn

Joined: Oct 05, 2010
Posts: 24

Hi,

I am new to JUnit and need to write JUnit test cases involving Spring and EJB in one functionality.

Please read below the exact scenario.

1. Fetching a list of employees using Spring jdbcTemplate.
2. Disable these employees using an EJB service.

Currently I am using org.springframework.test.AbstractDependencyInjectionSpringContextTests for creating unit test for employee fetching using Spring.
After this I need to call the EJB service for this employee list to disable them.

Please help me whether I can integrate these Sring and EJB in same JUnit test case or I need to write separate test cases ?

Your help is greatly appreciated
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19693
    
  20

Moving to our test forum.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30512
    
150

Arun,
Yes, you can use the same integration test case if the EJB is a remote call.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JUnit integration with EJB and Spring