📄 viewthreadactiontest.java
字号:
/* * 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 ViewThreadAction */public class ViewThreadActionTest extends MyMockStrutsTestCase { public ViewThreadActionTest(String s) { super(s); } public void setUp() throws Exception { super.setUp(); DAOFactory.buildMockDAOFactory(); setRequestPathInfo("/viewThread"); } public void testOk() { addRequestParameter( "parentId", Constants.VALID_THREAD_ID ); actionPerform(); verifyNoActionErrors(); verifyForward( "success" ); assertNotNull( "thread collection in request", getRequest().getAttribute( ForumConstants.THREADS_COLLECTION_KEY ) ); } public void testThreadNotFound() { addRequestParameter( "parentId", Constants.INVALID_THREAD_ID ); actionPerform(); verifyForward( "error" ); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -