お気に入りParise Ravikiran (Cognizant Technology Solutions) が「#Apex」で質問2023年1月24日 11:01System.AssertException: Assertion Failed: Expected: Consented, Actual: null Class.LeadTriggerUtilityTest.leadInsertOptIn: line 1342, column 1static void leadInsertOptIn() { String email = 'dummy.rand.Opt.In@email.321.org'; Test.startTest(); Lead sfdcLead1 = CreateLead('John', 'leadInsertOptIn', email, 'Docusign', 'United States'); sfdcLead1.HasOptedOutOfEmail = false; sfdcLead1.Hard_Opt_In__c = true; insert sfdcLead1; Test.stopTest(); Lead l = GetLeadById(sfdcLead1.Id); System.assertEquals(false, l.HasOptedOutOfEmail); System.assertEquals(true, l.Hard_Opt_In__c); System.assertEquals(false, l.Outreach_Opt_Out__c); System.assertEquals(LeadToOpportunityUtilityCls.CONSENTED, l.Email_Consent_Status__c); } 1 件の回答並び替え日付で並び替え役に立った順で並び替え日付で並び替えSai Praveen Kumar Kakkirala (Salesforce)2023年1月24日 11:03Hi,You are getting the value of Email_Consent_Status__c as Null. But in the assert statement you are expecting the vallue as "Consented". Can you check if the assert is correct ?Thanks, コメントを追加回答を記入...太字斜体下線取り消し線箇条書き番号付きリストリンクを追加コードブロック画像を挿入ファイルを添付リンク URLキャンセル保存0/9000返信
Sai Praveen Kumar Kakkirala (Salesforce)2023年1月24日 11:03Hi,You are getting the value of Email_Consent_Status__c as Null. But in the assert statement you are expecting the vallue as "Consented". Can you check if the assert is correct ?Thanks,