Blog信息 |
blog名称:小鸟吹烟 日志总数:157 评论数量:424 留言数量:-1 访问次数:1263646 建立时间:2006年10月23日 |

| |
[SSH 学习区]StrutsTestCase 进行struts测试 随笔, 心得体会, 软件技术
tone 发表于 2007/2/1 13:35:12 |
public class PersonActionTest extends MockStrutsTestCase {
public void testAddPersonReg(){
setRequestPathInfo("/personCheckLogin.do"); addRequestParameter("method","checkLogin"); addRequestParameter("personName","hh"); actionPerform(); verifyActionErrors( new String[] {"errors.login"}); verifyForwardPath("/WEB-INF/jsp/person/checkLogin.jsp"); assertNull(request.getAttribute(Constant.USER_SESSION_KEY)); PersonInfo per = (PersonInfo)request.getAttribute (Constant.USER_SESSION_KEY);
} } |
|
|