function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
VFVF 

code coverage for the below code

 if(contactID != null)
    {
        Contact contact = [Select Id, HasOptedOutOfEmail from contact WHERE Id=:obj.Contact__c];
         if(contact.HasOptedOutOfEmail == true)
               {
                 system.assertEquals(contact.HasOptedOutOfEmail , true); 
               }
               else
               {
                  system.assertEquals(contact.HasOptedOutOfEmail , true); 

               }
               update contact;
    }
 
thanks
prashanth 

dmchengdmcheng
What is your question??