📄 injectspringobjectfactorytest.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 + -