-
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 6 years, 7 months ago by
Shubham.
-
This discussion was modified 6 years, 7 months ago by
Log In to reply.
Popular Salesforce Blogs
Salesforce Projects: Let's Spot the Trouble Before It Starts!
Imagine building a house. You wouldn't just start hammering without a plan, right? You'd check the soil, consider weather, and make sure you have the…
Service Cloud: Help faster by Using Different Communication Channels
Today's customers expect fast and efficient service. Companies are meeting these needs with innovative solutions like Service Cloud. Service Cloud allows companies to respond faster…
Learn All About The Features of Newly Launched Salesforce Lightning Platform
A Brief of Salesforce Lightning As per the announcement done by Salesforce in its Winter 17 release, Salesforce Lightning is the future CRM of Salesforce,…
Popular Salesforce Videos
How To Create Permission Set Group | Salesforce Development Tutorial
How to create permission set groups. This video will cover the following points - 1. Introduction Get a brief introduction about Permission Set Groups. 2.…
Create an Email Alert Workflow Rule | Workflow Rules in Salesforce | Salesforce Automations
Configuring Workflow Rule Email Alerts or Notifications Follow. Workflow Rules are automatic processes that trigger an action when a certain event occurs, such as updating…
Salesforce App Builder Training | Salesforce App Builder Tutorial | Intellipaat
In this salesforce app builder tutorial, you will learn what is Salesforce CRM, a Sales rep in Salesforce, various user settings in Salesforce, and how…
Popular Salesforce Infographics
Enhance Customer Experience With Salesforce
Salesforce Makes Personalized, Consistent Digital Customer Experience a Reality. Salesforce, widely recognized as the leader in business CRM, gives organizations the tools they need to…
Benefits of Salesforce Commerce Cloud
As the online marketplace is continuously growing in the global economy, it's important to have a feature-loaded and scalable e-commerce platform. Salesforce commerce cloud is…
Dreamforce 2019 in Review: Key Facts and Figures
November 19–22 marked Salesforce’s 17th Dreamforce event, bringing together the Salesforce community — customers, partners, employees, students, and more — for four days of innovation,…