@isTest
|
private class LexRequestCloseControllerTest {
|
public static String rectCo = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('Agency').getRecordTypeId();
|
public static String rectHp = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('HP').getRecordTypeId();
|
public static String leadNR = Schema.SObjectType.Lead.getRecordTypeInfosByDeveloperName().get('NewDaily_Report').getRecordTypeId();
|
public static String rectAg = Schema.SObjectType.Contact.getRecordTypeInfosByDeveloperName().get('Agency').getRecordTypeId();
|
static testMethod void testMethod1() {
|
Task t1 = new Task(
|
Subject = 'test_task',
|
Status = '未着手',
|
Priority = '中'
|
);
|
insert new Task[] {t1};
|
|
Account testRectcoAccounts = new Account(Name = 'testRectcoAccount', RecordTypeId =Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('HP').getRecordTypeId());
|
insert testRectcoAccounts;
|
Account testRectHpAccounts = new Account(Name = 'testRectHpAccount', RecordTypeId = rectCo, Hospital__c = testRectcoAccounts.id);
|
insert testRectHpAccounts;
|
Contact testContacts = new Contact(email='jplumber@salesforce.com', firstname='Joe', lastname='Plumber',RecordTypeId = rectAg, AWS_Data_Id__c = 'TestContact', accountId = testRectHpAccounts.id);
|
insert testContacts;
|
Lead testLeads = new Lead(LastName='testLead', Company='testLead',RecordTypeId = leadNR, Hospital_Name__c = testRectHpAccounts.id, Contact_Name__c = testContacts.Id);
|
insert testLeads;
|
QuoteIrai__c irai = new QuoteIrai__c();
|
irai.IraiSubject__c = '委托01';
|
irai.IraiUser__c = null;
|
irai.CurrencyIsoCode = 'USD';
|
insert irai;
|
LexRequestCloseController.init(null);
|
LexRequestCloseController.getProfileId();
|
LexRequestCloseController.getProfileIds();
|
LexRequestCloseController.updateTask(t1.Id,'未着手');
|
LexRequestCloseController.updateTask('asdsa','未着手');
|
}
|
}
|