摘要: 对Struts2 Action如何进行单元测试?下面我们就来讲一下。 我们可以使用struts2发行包中的struts2-junit-plugin-2.2.1.1.jar,它里面提供了两个类StrutsTestCase、StrutsSpringTestCase,分别提供对纯struts应用和struts+spring整合时的单元测试支持。 1.StrutsTestCase 首先准备一个纯struts2工程,建立工程过程略,但有如下的类: Account.java,是bean package model; public class Account { private String... 阅读全文
posted @ 2013-09-25 17:18 liyuchen8908 阅读(787) 评论(0) 推荐(0)