@isTest
|
private class NFM621ControllerTest {
|
|
static testMethod void testMethod1() {
|
|
Profile p = [select Id from Profile where id =:System.Label.ProfileId_SystemAdmin];
|
// ユーザー作成
|
User hpOwner = new User(Test_staff__c = true, LastName = 'hp', FirstName = 'owner', Alias = 'hp', CommunityNickname = 'hpOwner', Email = 'olympus_hpowner@sunbridge.com', Username = 'olympus_hpowner@sunbridge.com', IsActive = true, EmailEncodingKey = 'ISO-2022-JP', TimeZoneSidKey = 'Asia/Tokyo', LocaleSidKey = 'ja_JP', LanguageLocaleKey = 'ja', ProfileId = p.id);
|
insert hpOwner;
|
User ur = [select Id,Employee_No__c from User limit 1];
|
//OCSM管理省を得る
|
OCM_Management_Province__c mp1 = new OCM_Management_Province__c();
|
mp1.Name = '北京';
|
mp1.Province__c = '北京市';
|
mp1.Window1__c = ur.Id;
|
mp1.OnlinePlatformWindow1__c = ur.Id;
|
mp1.OnlinePlatformWindow2__c = ur.Id;
|
mp1.OnlinePlatformWindow3__c = ur.Id;
|
insert mp1;
|
|
List<User> userList = [select Id,Employee_No__c from User ];
|
List<String> noList = new List<String>();
|
for(User user1 : userList){
|
noList.add(user1.Id);
|
}
|
BatchIF_Log__c iflog = new BatchIF_Log__c();
|
iflog.Log__c = 'test start \n';
|
insert iflog;
|
|
NFM621Controller.callout(iflog.ID,noList);
|
}
|
|
|
}
|