Here is sample code for Junit testing with spring/hibernate.
@ContextConfiguration(locations = { "/applicationContext-hibernate-test.xml" })
public class TestDaoImplTest extends AbstractJUnit4SpringContextTests {
@Autowired
TestDao testDao;
@Before
public void setUp() {
}
@After
public void tearDown() {
}
@Test
public void test() {
testDao.callyourmethod();
}
}
Monday, July 6, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment