Hi MANISHA AKHADE, This is my simple apex class where I update Opportunity.
public class UpdateOpp {
public static void newUpdateOpp(){
List<opportunity> opp = new List<opportunity>();
opp = [Select Name, CloseDate from Opportunity WHERE CloseDate>TODAY];
system.debug('opp' +opp);
List<opportunity> opp1 = new List<opportunity>();
for(Opportunity opp2:opp){
opp2.Name = opp2.Name+'F';
opp1.add(opp2);
system.debug('opp1' +opp1);
system.debug('+++++++++++' +opp);
}
update opp;
}
}
Use the @isTest annotation to define classes and methods that only contain code used for testing your application. In the test class, we have to cover at least 75% code to deploy the code into production.Here I write there Test class:
please refer to the below link for more details. https://trailhead.salesforce.com/content/learn/modules/apex_testing/apex_testing_intro I hope you find the above solution helpful. If it does, please mark it as the Best Answer to help others too. Thanks and Regards, Suraj Tripathi
This is not an easy task before you. Good programming skills and writing talent are needed here. If you doubt your abilities, then prepare your own version of the text and send it to the rewriting service https://www.rewritingservices.net/ These guys helped me a lot, I think it will be much easier for you to cope with your task with them too.
MANISHA AKHADE,
This is my simple apex class where I update Opportunity.
Use the @isTest annotation to define classes and methods that only contain code used for testing your application.
In the test class, we have to cover at least 75% code to deploy the code into production.Here I write there Test class:
please refer to the below link for more details.
https://trailhead.salesforce.com/content/learn/modules/apex_testing/apex_testing_intro
I hope you find the above solution helpful. If it does, please mark it as the Best Answer to help others too.
Thanks and Regards,
Suraj Tripathi