From 1ee9818f763b1910c24d52ebc61a715afea370bb Mon Sep 17 00:00:00 2001
From: 19626 <1962676589@qq.com>
Date: 星期二, 20 六月 2023 17:58:28 +0800
Subject: [PATCH] Merge branch 'LEX_chenjingwu_dev' of http://47.92.229.245:8089/r/lightningupdate into LEX_chenjingwu_dev

---
 force-app/main/default/classes/NewAndEditLeadControllerTest.cls |   63 +++++++++++++++++++++++++++++++
 1 files changed, 63 insertions(+), 0 deletions(-)

diff --git a/force-app/main/default/classes/NewAndEditLeadControllerTest.cls b/force-app/main/default/classes/NewAndEditLeadControllerTest.cls
index 9aec75f..d9a9527 100644
--- a/force-app/main/default/classes/NewAndEditLeadControllerTest.cls
+++ b/force-app/main/default/classes/NewAndEditLeadControllerTest.cls
@@ -33,9 +33,72 @@
         Test.stopTest();
     }
 
+    static testMethod void testMethod2() {
+        Lead leadTest = new Lead();
+        leadTest.LastName = 'test';
+        leadTest.Company = 'test';
+        insert leadTest;
+        String url = ApexPages.currentPage().getParameters().put('CF00N10000006ps6f_lkid','000000000000000');
+        url = ApexPages.currentPage().getParameters().put('CF00N10000002CvC5_lkid','000000000000000');
+        url = ApexPages.currentPage().getParameters().put('RecordType','01210000000QiRf');
+        Test.startTest();
+        try{
+            NewAndEditLeadController.ControllerUtil();
+            ApexPages.StandardController con =  new ApexPages.StandardController(leadTest);
+            NewAndEditLeadController lc = new NewAndEditLeadController(con);
+            String jsonString = '["Department_Class__c"]';
+            system.debug('jsonString:'+JSON.deserializeUntyped(jsonString));
+            String token = lc.awsToken;
+            String AWSDataId = lc.AWSDataId;
+            String AWSDataIdInquiryForm = lc.AWSDataIdInquiryForm;
+            String contactId = lc.contactId;//For Lookup field
+            String contactsInfo = lc.contactsInfo ;//key sfid;value awsid
+            Inquiry_form__c ifc = lc.ifc;
+            NewAndEditLeadController.queryAccount(jsonString, '000000000000000');
+        }catch(Exception e){
+            system.debug('Exception from query account:'+e.getMessage());
+        }
+        Test.stopTest();
+    }
+
     static testMethod void testMethod3() {
         Lead leadTest = new Lead();
         String url = ApexPages.currentPage().getParameters().put('CF00N10000006ps6f_lkid','000000000000000');
+        url = ApexPages.currentPage().getParameters().put('CF00N10000002CvC5_lkid','000000000000000');
+        url = ApexPages.currentPage().getParameters().put('RecordType','01210000000QiRf');
+        Test.startTest();
+        try{
+            NewAndEditLeadController.ControllerUtil();
+            ApexPages.StandardController con =  new ApexPages.StandardController(leadTest);
+            NewAndEditLeadController lc = new NewAndEditLeadController(con);
+            String jsonString = '["Department_Class__c"]';
+            system.debug('jsonString:'+JSON.deserializeUntyped(jsonString));
+            String token = lc.awsToken;
+            String AWSDataId = lc.AWSDataId;
+            String AWSDataIdInquiryForm = lc.AWSDataIdInquiryForm;
+            String contactId = lc.contactId;//For Lookup field
+            String contactsInfo = lc.contactsInfo ;//key sfid;value awsid
+            Inquiry_form__c ifc = lc.ifc;
+            NewAndEditLeadController.queryAccount(jsonString, '000000000000000');
+        }catch(Exception e){
+            system.debug('Exception from query account:'+e.getMessage());
+        }
+        Test.stopTest();
+    }
+
+    static testMethod void testMethod4() {
+        // Lead leadTest = new Lead();
+        Lead leadTest = new Lead();
+        leadTest.LastName = 'test';
+        leadTest.Company = 'test';
+        insert leadTest;
+        Inquiry_form__c inquiryform = new Inquiry_form__c();
+        inquiryform.Name = '2019102101';
+        inquiryform.Request1__c = '闇�瑕佹姤浠�';
+        inquiryform.Product1__c = '瓒呭0';
+        inquiryform.FSE_Owner__c  = UserInfo.getUserId();
+        insert inquiryform;
+        String url = ApexPages.currentPage().getParameters().put('CF00N1000000962np_lkid',inquiryform.id);
         url = ApexPages.currentPage().getParameters().put('RecordType','01210000000QiRf');
         Test.startTest();
         try{

--
Gitblit v1.9.1