📄 meetingservicetest.java
字号:
package com.wondersgroup.test;
import java.text.ParseException;
import java.util.List;
import com.wondersgroup.businessmodule.meetingmanage.bo.BusinessMeetingRoom;
import com.wondersgroup.businessmodule.meetingmanage.bo.BusinessMeetingRoomInfo;
import com.wondersgroup.businessmodule.meetingmanage.service.MeetingService;
import com.wondersgroup.core.Function;
import com.wondersgroup.framework.test.AbstractTestCase;
/**
* 业务模块 会议管理 单元测试
* @author Li AoHai
*/
public class MeetingServiceTest extends AbstractTestCase {
private BusinessMeetingRoom room;
private BusinessMeetingRoomInfo roomInfo;
private MeetingService service;
public void onSetUpInTransaction() throws Exception {
super.onSetUpInTransaction();
service = (MeetingService)applicationContext.getBean("meetingManageService");
}
protected String[] getConfigLocations() {
return new String[]{"classpath*:*Context.xml"};
}
public void testAreYouReady(){
assertNotNull(service);
}
public void testFindAllFromRoom(){
service.findAllFromRoom();
}
public void testFindRoomPage(){
List list = service.getRoomList(1, "aa", 1, 15).getResult();
for(int i=0;i<list.size();i++){
room = (BusinessMeetingRoom)list.get(i);
System.out.println(room.getRoomInfo().getName());
}
}
public void testNewRoom(){
service.saveRoomInfo("name", "pos", 40, "person", 1, 0, "statusRes", "equ", "remark");
}
public void testupdateRoom(){
service.updateRoomInfo(101,"name", "pos", 40, "person", 1, 123, "statusRes", "equ", "remark");
}
public void testGetRequestList(){
service.getMyRequestMeetingList("123", "2007-5-5", "2007-9-7", 0, "", 1, 20);
}
public void testSaveRequest(){
try {
service.saveRequest(1, "userName", "20070701001", "title",
Function.string2Time("2007-07-01 09:30:00.000"),
Function.string2Time("2007-07-01 19:30:00.000"), "personNames", "1,2,3,4", 10000,
"context", 30, 1, "remark","liao",0,"leader",1,
0,3);
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
public void testGetMeetingInfoByCode(){
service.getMeetingInfoByCode("20070505001", null);
}
public void testUpdateRequest(){
try {
service.updateRequest(1, "userName", "20070701001", "title mod",
Function.string2Time("2007-07-01 09:30:00.000"),
Function.string2Time("2007-07-01 19:30:00.000"), "personNames,a,b,c,s,e", "1,2,3,4", 10000,
"context", 30, 1, "remark","liao",0,"leader",1,
0,3);
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
public void testInsert(){
}
public void testMaxCode(){
service.test();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -