struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Cook" <James.C...@wecomm.com>
Subject RE: unit test the service layer (aka data access layer)
Date Mon, 21 Jun 2010 09:02:03 GMT
Get involved with:

Junit 4.4
Spring-test libs

And started your service test class like such:

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = "classpath:/testConfigXML.xml")
public class MyServiceImplTest extends AbstractJUnit4SpringContextTests
{

    @Autowired(required = true)
    private MyService myService = null;

testConfigXML.xml will contain your *test* config..

Then do the do!


-----Original Message-----
From: Jake Vang [mailto:vangjake@googlemail.com] 
Sent: 21 June 2010 05:54
To: Struts Users Mailing List
Subject: unit test the service layer (aka data access layer)

hi, i've been following this code here at
http://struts.apache.org/2.0.14/docs/struts-2-spring-2-jpa-ajax.html.
what i want to know is how to unit test the service layer (or data
access object layer). in the case of the link, it would be the
PersonServiceImpl class.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message