You need to sign in to do that
Don't have an account?
Atul Singh 87
getting error in Test code Coverage
Hi All how do i write test class for this? I am getting error : "System.NullPointerException: Attempt to de-reference a null object"
Code:
public Boolean isExistingOktaUser(String UserEmail){
Boolean isExistingUser=false;
Boolean goAhead = true;
userLoginAddress = '';
if(ACN_Utilities.CheckNullOrEmpty(UserEmail)){
goAhead = false;
}
Code:
public Boolean isExistingOktaUser(String UserEmail){
Boolean isExistingUser=false;
Boolean goAhead = true;
userLoginAddress = '';
if(ACN_Utilities.CheckNullOrEmpty(UserEmail)){
goAhead = false;
}
Kindly initiate object using 'new' .
Example:
Btx_UserProvisionHelper test = new Btx_UserProvisionHelper();
List<User> UserEmail =[select Email from User Where Id= :usr.Id];
Boolean isExitOktaUser = test.isExistingOktaUser(UserEmail[0].Email);