cpservicetest.java
来自「这个是完整的wap项目的源码 开发语言 Java 系统架构 Struts +」· Java 代码 · 共 35 行
JAVA
35 行
package com.longtime.wap.module.cost.service;
import java.util.List;
import com.longtime.wap.common.util.BaseTestCase;
import com.longtime.wap.model.Cp;
public class CpServiceTest extends BaseTestCase {
private CpService service;
public CpServiceTest() {
super();
service = (CpService)context.getBean("cpService");
}
/*
* Test method for 'com.longtime.wap.module.cost.service.CpService.getCps()'
*/
public void testGetCps() {
List list = service.getCps();
assertEquals(10,list.size());
}
/*
* Test method for 'com.longtime.wap.module.cost.service.CpService.getCpById(Long)'
*/
public void testGetCpById() {
Cp cp = service.getCpById(Long.valueOf(121));
assertEquals("韩国时代",cp.getCompanyName());
assertEquals(12345679,cp.getCompanyCode());
assertEquals("2007-11-29",cp.getRegDate().toString());
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?