StrutsTestCase is a powerful and conveniont tool for testing behavior of Struts.
But there are some difficulties in testing Spring+StrutsTestCase.
1. How to bind JNDI without server environment, like weblogic, jboss
2. How to bind WebApplicationContext
Here is the solution:
Add the following codes to your class.
本文介绍了一种在没有服务器环境的情况下使用StrutsTestCase结合Spring进行单元测试的方法。通过设置文件路径并初始化WebApplicationContext,实现了对Spring管理的Bean进行访问及JNDI绑定。

被折叠的 条评论
为什么被折叠?



