?? actiondispatchedtestassertinterceptor.java
字號(hào):
/*
* Copyright (c) 2002-2003 by OpenSymphony
* All rights reserved.
*/
/*
* Created on 2/10/2003
*
*/
package org.softme.jworks.dispatcher;
import org.softme.jworks.TestAction;
import com.opensymphony.xwork.ActionInvocation;
import com.opensymphony.xwork.interceptor.Interceptor;
import junit.framework.Assert;
/**
* @author CameronBraid
*/
public class ActionDispatchedTestAssertInterceptor implements Interceptor {
//~ Constructors ///////////////////////////////////////////////////////////
/**
*
*/
public ActionDispatchedTestAssertInterceptor() {
super();
}
//~ Methods ////////////////////////////////////////////////////////////////
/* (non-Javadoc)
* @see com.opensymphony.xwork.interceptor.Interceptor#destroy()
*/
public void destroy() {
}
/* (non-Javadoc)
* @see com.opensymphony.xwork.interceptor.Interceptor#init()
*/
public void init() {
}
/* (non-Javadoc)
* @see com.opensymphony.xwork.interceptor.Interceptor#intercept(com.opensymphony.xwork.ActionInvocation)
*/
public String intercept(ActionInvocation invocation) throws Exception {
Assert.assertTrue(invocation.getAction() instanceof TestAction);
TestAction testAction = (TestAction) invocation.getAction();
Assert.assertEquals("bar", testAction.getFoo());
String result = invocation.invoke();
return result;
}
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -