Aggiungi ai preferitiParise Ravikiran (Cognizant Technology Solutions) ha fatto una domanda in #Apex24 gen 2023, 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 rispostaOrdinaOrdina per dataOrdina in base alla maggiore utilitàOrdina per dataSai Praveen Kumar Kakkirala (Salesforce)24 gen 2023, 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, Aggiungi un commentoScrivi una risposta...GrassettoCorsivoSottolineaBarratoElenco puntatoElenco numeratoAggiungi linkBlocco codiceInserisci immagineAllega fileURL del linkAnnullaSalva0/9000Rispondi
Sai Praveen Kumar Kakkirala (Salesforce)24 gen 2023, 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,