⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 injectspringobjectfactorytest.java

📁 在Struts2中的jar包xwork的源代码.版本为2.0.7
💻 JAVA
字号:
/* * Created on Jun 29, 2004 */package com.opensymphony.xwork2.spring;import com.opensymphony.xwork2.ObjectFactory;import com.opensymphony.xwork2.XWorkTestCase;import org.springframework.context.ApplicationContext;import org.springframework.context.support.ClassPathXmlApplicationContext;/** * Test that Spring correctly calls the "init" method of the * {@link com.opensymphony.xwork2.spring.SpringObjectFactory} *  * @author Simon Stewart */public class InjectSpringObjectFactoryTest extends XWorkTestCase {    public void testSpringShouldCallInitMethod() {        ApplicationContext appContext = new ClassPathXmlApplicationContext(                "com/opensymphony/xwork2/spring/autowireContext.xml");        ObjectFactory factory = ObjectFactory.getObjectFactory();        assertTrue(                "ObjectFactory should be an instance of SpringObjectFactory",                factory instanceof SpringObjectFactory);    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -