Apex Class:- its a piece of code which do some task in your application.
in simple if you have written a piece of code to add two fields. and display that in another field.
apex class syntax
Public Class add{
your code..........
}
Apex test Class :-its also a piece of code which test the functionality of the apex class.
Ex:-to check the above apex program is performing correctly or not in runtime ,you will write test method by insert in some dummy data and checking the out put in the same class by using system assert function.
apex test class syntax:-
@isTest
private class add {
static testMethod void add() {
Your test code...............
}
}
@isTest on the top meaning its a test class and method including keyword testMethod is also a way to recognize test class.
Mark this question as solve and choose the best answer if this answers your question.
Apex Class:- its a piece of code which do some task in your application.
in simple if you have written a piece of code to add two fields. and display that in another field.
apex class syntax
Public Class add{
your code..........
}
Apex test Class :-its also a piece of code which test the functionality of the apex class.
Ex:-to check the above apex program is performing correctly or not in runtime ,you will write test method by insert in some dummy data and checking the out put in the same class by using system assert function.
apex test class syntax:-
@isTest
private class add {
static testMethod void add() {
Your test code...............
}
}
@isTest on the top meaning its a test class and method including keyword testMethod is also a way to recognize test class.
Mark this question as solve and choose the best answer if this answers your question.
Regards,
Santosh Chitalkar