Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否有任何框架可以为 JSF 托管 Bean 编写 J 单元。
当我尝试测试包含以下代码的方法时,我得到空指针异常。
FacesContext context = FacesContext.getCurrentInstance(); myBean =(MyBean)context.getApplication.evaluteExpressionGet(context,#{myBean},MyBean.class);
我还没有尝试过,但是 JBoss.org 发布了一个名为 JSFUnit 的框架,也许你会尝试一下?!
http://www.jboss.org/jsfunit/