• dipen joe
  • NEWBIE
  • -1 Points
  • Member since 2022

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 3
    Replies
Hi All i need help for the below lines to cover in the test class can you please help me to cover the class.

   public void autoPopulateSrcAccount(){
        if(rih.Source_Inventory__c != null)
        {         
           MedConnect__Inventory_Header__c invh =[select id,MedConnect__Location__c from MedConnect__Inventory_Header__c where Id =: rih.Source_Inventory__c];
           rih.Source_Account__c = invh.MedConnect__Location__c;
        }       
     }
    public void autoPopulatedesAccount(){
         if(rih.Destination_Inventory__c != null)
        {
           MedConnect__Inventory_Header__c invh =[select id,MedConnect__Location__c from MedConnect__Inventory_Header__c where Id =: rih.Destination_Inventory__c];
           rih.Destination_Account__c = invh.MedConnect__Location__c; 
        }
    }


thanks in Advance.
global class StackOverflowPostDataSourceProvider
        extends DataSource.Provider {

   
    override global List<DataSource.AuthenticationCapability>
    getAuthenticationCapabilities() {
        List<DataSource.AuthenticationCapability> capabilities =
                new List<DataSource.AuthenticationCapability>();
        capabilities.add(
                DataSource.AuthenticationCapability.ANONYMOUS);
        return capabilities;
    }
    override global List<DataSource.Capability>
    getCapabilities() {
        List<DataSource.Capability> capabilities =
                new List<DataSource.Capability>();
        capabilities.add(DataSource.Capability.ROW_QUERY);
        return capabilities;
    }

    override global DataSource.Connection getConnection(
            DataSource.ConnectionParams connectionParams) {
        return new 
            StackOverflowDataSourceConnection(connectionParams);
    }
}