📄 customermanagertest.java
字号:
package com.bjsxt.crm.manager;
import junit.framework.TestCase;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import com.bjsxt.crm.model.CompanyCustomer;
import com.bjsxt.crm.model.Customer;
public class CustomerManagerTest extends TestCase {
private static BeanFactory factory = new ClassPathXmlApplicationContext("applicationContext-*.xml");
public void testAddCustomer() {
CustomerManager cm = (CustomerManager)factory.getBean("customerManager");
Customer customer = new CompanyCustomer();
customer.setName("测试公司");
cm.addCustomer(customer, 0, 0);
}
public void testAddCustomerWithParent() {
CustomerManager cm = (CustomerManager)factory.getBean("customerManager");
Customer customer = new CompanyCustomer();
customer.setName("测试公司的子公司");
cm.addCustomer(customer, 1, 0);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -