Month End Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: simple70

Salesforce Certified Platform Developer II ( Plat-Dev-301 ) PDII Question # 4 Topic 1 Discussion

Salesforce Certified Platform Developer II ( Plat-Dev-301 ) PDII Question # 4 Topic 1 Discussion

PDII Exam Topic 1 Question 4 Discussion:
Question #: 4
Topic #: 1

Java

@isTest

static void testUpdateSuccess() {

Account acet = new Account(Name = 'test');

insert acet;

// Add code here

extension.inputValue = 'test';

PageReference pageRef = extension.update();

System.assertNotEquals(null, pageRef);

}

What should be added to the setup, in the location indicated, for the unit test above to create the controller extension for the test?


A.

AccountControllerExt extension = new AccountControllerExt(acet);


B.

ApexPages.StandardController sc = new ApexPages.StandardController(acet); AccountControllerExt extension = new AccountControllerExt(sc);


C.

ApexPages.StandardController sc = new ApexPages.StandardController(acet.Id); AccountControllerExt extension = new AccountControllerExt(sc);


D.

AccountControllerExt extension = new AccountControllerExt(acet.Id);


Get Premium PDII Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.