You need to sign in to do that
Don't have an account?
Bharat Seth 12
Need Help with Test Class Asap
Can anyone help me write Test Class for below Apex Class.
public class CheckSalesTeam {
public static boolean IsSalesTeam=false;
public static Boolean profileApprover(){
List<Profile> profileList = New List<Profile>([SELECT Name FROM PROFILE WHERE Id = :UserInfo.getProfileId() LIMIT 1]);
if(profileList[0].Name !='Sales Approver')
IsSalesTeam=True;
return IsSalesTeam;
}
}
public class CheckSalesTeam {
public static boolean IsSalesTeam=false;
public static Boolean profileApprover(){
List<Profile> profileList = New List<Profile>([SELECT Name FROM PROFILE WHERE Id = :UserInfo.getProfileId() LIMIT 1]);
if(profileList[0].Name !='Sales Approver')
IsSalesTeam=True;
return IsSalesTeam;
}
}
Since you are not passing any parameter in the method, you can simply call the method in Test class like this: