PDII Exam Question 1

Refer to the test method below:
Java
@isTest
static void testAccountUpdate() {
Account acct = new Account(Name = 'Test');
acct.Integration_Updated__c = false;
insert acct;
CalloutUtil.sendAccountUpdate(acct.Id);
Account acctAfter = [SELECT Id, Integration_Updated__c FROM Account WHERE Id = :acct.Id][0]; System.assert(true, acctAfter.Integration_Updated__c);
}
The test method calls a web service that updates an external system with Account information and sets the Account's Integration_Updated__c checkbox to True when it completes. The test fails to execute and exits with an error: "Methods defined as TestMethod do not support Web service callouts." What is the optimal way to fix this?
  • PDII Exam Question 2

    Which technique can run custom logic when a Lightning web component is loaded?
  • PDII Exam Question 3

    A developer wrote a class named AccountHistoryManager that relies on field history tracking. The class has a static method called getAccountHistory that takes in an Account as a parameter and returns a list of associated AccountHistory object records. The following test fails:
    Java
    @isTest
    public static void testAccountHistory(){
    Account a = new Account(name = 'test');
    insert a;
    a.name = a.name + '1';
    update a;
    List<AccountHistory> ahList = AccountHistoryManager.getAccountHistory(a); System.assert(ahList.size() > 0);
    }
    What should be done to make this test pass?
  • PDII Exam Question 4

    Given the following containment hierarchy:
    HTML
    <template>
    <c-my-child-components></c-my-child-components>
    </template>
    What is the correct way to communicate the new value of a property named "passthrough" to my-parent- component if the property is defined within my-child-component?
  • PDII Exam Question 5

    A company has a native iOS order placement app that needs to connect to Salesforce to retrieve consolidated information from many different objects in a JSON format. Which is the optimal method to implement this in Salesforce?