You need to sign in to do that
Don't have an account?
Akshay Alandkar
want test class for
public void AccountVerification(List<Account> account3){
USER u=[SELECT Id,Name,username,Alias FROM User WHERE Name='barak obama'];
for(Account acc:account3){
if(acc.Status__c=='Verification Needed'){
acc.OwnerId=u.Id;
}
}
}
public void REIError(List<Account> account3){
for(Account acc:account3)
{
string testName='REI';
if(acc.Name.Contains(testName))
{
acc.addError('The Account Name Should Not contain REI Text Value.');
}
else
{
if(acc.Name.Contains('__Test')){
//do nothing
}
else{
acc.name=acc.name+'__Test';
}
}
}
}
USER u=[SELECT Id,Name,username,Alias FROM User WHERE Name='barak obama'];
for(Account acc:account3){
if(acc.Status__c=='Verification Needed'){
acc.OwnerId=u.Id;
}
}
}
public void REIError(List<Account> account3){
for(Account acc:account3)
{
string testName='REI';
if(acc.Name.Contains(testName))
{
acc.addError('The Account Name Should Not contain REI Text Value.');
}
else
{
if(acc.Name.Contains('__Test')){
//do nothing
}
else{
acc.name=acc.name+'__Test';
}
}
}
}
Try Below Code Please Mark It As Best Answer If It Helps
Thank You!
Static method cannot be referenced from a non static context: void AccountHelperClass.AccountVerification(List<Account>)
Try Below Code Please Mark It As Best Answer If It Helps
Thank You!