@Test
public ActionForward test_Junit(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response){
System.out.println("Test Action And Junit");
return null;
}
为什么不行呢。。。???
@Test
public ActionForward test_Junit(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response){
System.out.println("Test Action And Junit");
return null;
}
测试是要有条件的,LZ这种说测试就要求能测试的写法,行不通的哦.
就LZ需要测试的内容来看,好几个东西都没有.
[quote]ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response
[/quote]
这些参数对象LZ打算怎么处理.不过能从实际环境中获得,就需要模拟.
LZ想办法模拟了吗? 为什么又那么多测试的辅助套件比如HttpUtil之类的东东.不就都是为了一个搭建一个模拟的平台而出现的.
请LZ自行研究模拟的办法.Google下经验和组件都很丰富. 好运.