-
what is the solution for this error(Method does not exist or incorrect signature: void StartTest() from the type test) in Salesforce?
i am experiencing this error (Method does not exist or incorrect signature: void StartTest() from the type test) in the asynchronous trail's future method unit..
here's my code
@isTest
public class AccountProcessorTest {
public static testmethod void AccountProcessorTest1(){
Account testaccount = new Account();
testaccount.name = 'Test Account';
insert testaccount;Contact testcontact = new Contact();
testcontact.FirstName = 'Chief';
testcontact.LastName = 'Hopper';
testcontact.AccountId = testaccount.Id;
insert testcontact;set<Id> AccId = new set<Id>();
AccId.add(testaccount.Id);Test.StartTest();
AccountProcessor.countContacts(AccId);
Test.StopTest();
Account ACC = [select Number_of_Contacts__c from Account where id = :testaccount.Id LIMIT 1];
System.assertEquals ( Integer.valueOf(ACC.Number_of_Contacts__c) ,1);
}}
Can anyone help me on how to tackle this error
- This discussion was modified 4 years, 2 months ago by Shubham.
Log In to reply.
Popular Salesforce Blogs
No Duplicates - Duplicate Management for Salesforce
No Duplicates is a brand new duplicate management app that is completely free. The app automates the entire deduplication process and provides reports for your…
Understanding Objects In Salesforce - All You Need To Know
It Takes 2 Weeks To Understand Objects in .Net and Java, But In Salesforce It Takes 2 min. Here Is How! In Salesforce, objects are…
How to use apex:actionFunction and apex:actionStatus in Salesforce Visualforce Page?
How to use apex:actionFunction and apex:actionStatus in visualforce page ? apex:actionFunction - It provides support for calling an apex method from JavaScript code using an…
Popular Salesforce Videos
Accenture Salesforce Training 2022
This video is about -Accenture Salesforce Training 2022 Orientation session and ASE SFDC Salesforce Certification. As the trusted leader in Salesforce implementation and transformation, Accenture can…
How Customers Embrace Salesforce - Literally!
Get ready to giggle ???? Couldn’t get enough of the famous Key and Peele’s video doing the rounds on social media? Check out our version…
Free 5 Day Salesforce Challenge!
To access the signup form head over to www.talentstacker.com/Salesforce TalentStacker Podcast Salesforce Episode: https://talentstacker.libsyn.com/how-to-earn-60k-100k-a-year-within-6-months-without-a-college-degree-say-what-salesforce-career-development-path-with-bradley-rice Do you already have a job as a Salesforce Professional and…
Popular Salesforce Infographics
10 Must Know Salesforce Stats
It’s no secret that Salesforce have been named number #1 most innovative company in the world 3 times over. We have summed up some of the key…
Salesforce – The Future of Digital Transformation | An Infographic
Salesforce has been coined as the world’s top CRM company and customer company. It has been soaring high in the clouds, so let’s brush through…
Salesforce Admin Certification Path
The Salesforce Certified Administrator program is designed for individuals who have experience as a Salesforce administrator. The program encompasses the breadth of applications, the features…