Sure Matt;
I'll include a few things just in case, starting with the
PersonControllerTest class:
package com.ss.webapp.controller;
import java.util.List;
import org.appfuse.webapp.controller.BaseControllerTestCase;
import org.springframework.ui.ModelMap;
import org.springframework.web.servlet.ModelAndView;
public class PersonControllerTest extends BaseControllerTestCase {
private PersonController c;
public void setPersonController(PersonController c) {
this.c = c;
}
public void testHandleRequest() throws Exception {
ModelAndView mav = c.handleRequest(null, null);
ModelMap m = mav.getModelMap();
assertNotNull(m.get("personList"));
assertTrue(((List) m.get("personList")).size() > 0);
}
}
and the core/src/main/resources/applicationContext.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
<bean id="personManager" class="org.appfuse.service.impl.GenericManagerImpl">
<constructor-arg>
<bean class="org.appfuse.dao.hibernate.GenericDaoHibernate"
autowire="byType">
<constructor-arg value="com.ss.model.Person"/>
</bean>
</constructor-arg>
</bean>
</beans>
and my dispatcher-servlet.xml configuration for personController:
<bean id="personController"
class="com.ss.webapp.controller.PersonController">
<property name="personManager" ref="personManager"/>
</bean>
I hope this if enough information for you.
thanks;
Marshall
Matt Raible <[EMAIL PROTECTED]> wrote:
What does the handleRequest() method of your PersonController look like?
Matt
On 5/22/07, marshall wrote:
> Hey all;
>
> I'm pretty new to appfuse. I'm going thru the tutorial, using a modular
> spring MVC archetype. I've created a PersonController and
> PersonControllerTest in the respective directories in the web/ component.
> I've also modified the dispatcher-servlet.xml for the proper mapping.
> When I run mvn test -Dtest=PersoncontrollerTest I'm getting an
> AssertionfailedError on the following line in PersonControllerTest:
>
> assertNotNull(m.get("personList"));
>
> Is there another configuration setting that I've overlooked?
>
> Thanks;
>
> Marshall
>
> ________________________________
> Finding fabulous fares is fun.
> Let Yahoo! FareChase search your favorite travel sites to find flight and
> hotel bargains.
>
>
--
http://raibledesigns.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------
Park yourself in front of a world of choices in alternative vehicles.
Visit the Yahoo! Auto Green Center.