customermanagertest.java
来自「这是一个crm系统的源码」· Java 代码 · 共 28 行
JAVA
28 行
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 + =
减小字号Ctrl + -
显示快捷键?