KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I try to run a JUnit test case for ProductDAO class, that is part of the spring web application. But it still fails. I am not sure by my test-context.xml file. I have ProductDAOImplTest class in path src/test/java and mentioned ProductController class in the stacktrace is saved in a path src/main/java . ProductDAOImplTest @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration("file:src/test/resources/test-context.xml") @Transactional public class ProductDAOImplTest { @Autowired private ProductDAO productDAO; @Test public void testAdd() { fail("Not yet implemented"); } @Test public void testEdit() { fail("Not yet implemented"); } @Test public void testGetAll() { fail("Not yet implemented"); } @Test public void testGet() { fail("Not yet implemented"); } @Test public void testRemove() { fail("Not yet implemented"); } @Test public void testGetByPage() { fail("Not yet implemented"); } } test-context.xml <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:context="http://www.springframework.org/schema/context" xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:jee="http://www.springframework.org/schema/jee" xmlns:lang="http://www.springframework.org/schema/lang" xmlns:p="http://www.springframework.org/schema/p" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:util="http://www.springframework.org/schema/util" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/ao
Tags (comma-separated)
Save Edits
Cancel