viewmythreadactiontest.java
来自「Chinaxp 论坛源代码」· Java 代码 · 共 42 行
JAVA
42 行
/* * XP Forum * * Copyright (c) 2002-2003 RedSoft Group. All rights reserved. * */package org.redsoft.forum.web;import org.redsoft.forum.dao.DAOFactory;import org.redsoft.forum.ForumConstants;/** * TestCase for ViewMyThreadAction */public class ViewMyThreadActionTest extends MyMockStrutsTestCase { public ViewMyThreadActionTest(String s) { super(s); } public void setUp() throws Exception { super.setUp(); DAOFactory.buildMockDAOFactory(); // logon first before editing account addRequestParameter("userName", "User1"); addRequestParameter("password", "111111"); setRequestPathInfo("/logon"); actionPerform(); } public void testOk() { setRequestPathInfo("/viewMyThreads"); actionPerform(); verifyNoActionErrors(); verifyForward( "success" ); assertNotNull( "startIndex in request", getRequest().getAttribute( ForumConstants.START_INDEX_PARAM ) ); assertNotNull( "endIndex in request", getRequest().getAttribute( ForumConstants.END_INDEX_PARAM ) ); assertNotNull( "thread count in request", getRequest().getAttribute( ForumConstants.THREAD_COUNT_PARAM ) ); assertNotNull( "threads in request", getRequest().getAttribute( ForumConstants.MY_THREAD_PARAM ) ); assertNotNull( "account in request",getRequest().getAttribute( ForumConstants.ACCOUNT ) ); }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?