From ba1c90575c47f9cb5c2ce0a20da90d3b1739b5fa Mon Sep 17 00:00:00 2001
From: buli <137736985@qq.com>
Date: 星期二, 26 四月 2022 11:47:45 +0800
Subject: [PATCH] 0425 Commit
---
force-app/main/default/classes/NewAndEditContactControllerTest.cls | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/force-app/main/default/classes/NewAndEditContactControllerTest.cls b/force-app/main/default/classes/NewAndEditContactControllerTest.cls
index 697641a..c7789ca 100644
--- a/force-app/main/default/classes/NewAndEditContactControllerTest.cls
+++ b/force-app/main/default/classes/NewAndEditContactControllerTest.cls
@@ -22,28 +22,29 @@
qis.PageLoad();
Test.stopTest();
}
- /*static testMethod void testMethod3() {
+ static testMethod void testMethod3() {
Test.setMock(HttpCalloutMock.class, new TestDataUtility.CreateMetaDataUtilityHttpMock());
// Contact contactTest = TestDataUtility.CreateContacts(1)[0];
- Account acc = TestDataUtility.CreateAccounts(1)[0];
+ // Account acc = TestDataUtility.CreateAccounts(1)[0];
//Account acc1 = [SELECT Id,Name FROM Account WHERE RecordType.DeveloperName = 'Office' OR RecordType.DeveloperName = 'AgencyContact' OR RecordType.DeveloperName = 'Agency' Limit 1];
String accrecordTypeId = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('Agency').getRecordTypeId();
- Account acc1 = new Account(Name = 'testacc1',RecordTypeId = accrecordTypeId);
+ Account acc1 = new Account(Name = 'testacc1',RecordTypeId = accrecordTypeId,ProductSegment__c='BS');
insert acc1;
+ Contact contact = new Contact();
- String recordTypeId = Schema.SObjectType.Contact.getRecordTypeInfosByDeveloperName().get('Account').getRecordTypeId();
+ String recordTypeId = Schema.SObjectType.Contact.getRecordTypeInfosByDeveloperName().get('SSBD').getRecordTypeId();
String url = ApexPages.currentPage().getParameters().put('RecordType',recordTypeId);
url = ApexPages.currentPage().getParameters().put('accid',acc1.Id);
url = ApexPages.currentPage().getParameters().put('con4_lkid',acc1.Id);
Test.startTest();
- ApexPages.StandardController con = new ApexPages.StandardController(new Contact());
+ ApexPages.StandardController con = new ApexPages.StandardController(contact);
NewAndEditContactController cont = new NewAndEditContactController(con);
// cont.rtTypeId
cont.PageLoad();
Test.stopTest();
- }*/
+ }
}
\ No newline at end of file
--
Gitblit v1.9.1