📄 ordermanagerimpltest.java
字号:
package lee;
import junit.framework.TestCase;
import junit.textui.TestRunner;
import org.springframework.test.AbstractDependencyInjectionSpringContextTests;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;
/**
* @author yeeku.H.lee kongyeeku@163.com
* @version 1.0
* <br>Copyright (C), 2005-2008, yeeku.H.Lee
* <br>This program is protected by copyright laws.
* <br>Program Name:
* <br>Date:
*/
public class OrderManagerImplTest extends AbstractDependencyInjectionSpringContextTests
{
OrderManager om;
public String[] getConfigLocations()
{
String[] configLocations = {"bean.xml"};
return configLocations;
}
public void onSetUp()
{
om = (OrderManager)applicationContext.getBean("orderManager");
}
public void onTearDown()
{
om = null;
}
public void testPlaceOrder()
{
Customer c = new Customer();
c.setFirstName("yeeku");
c.setLastName("lee");
c.setEmailAddress("spring_test@163.com");
Order order = new Order();
order.setOrderNumber("200603034");
order.setCustomer(c);
om.placeOrder(order);
}
public static void main(String[] args) throws Exception
{
TestRunner.run(OrderManagerImplTest.class);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -