You need to sign in to do that
Don't have an account?
Manjunath reddy 25
Need help in writing test class
How to write a test class for the below class
public with sharing class GSDASDPHPEAccountTeam { public GSD_Account_Success_Delivery_Plan__c mainAcctID; public GSDASDPHPEAccountTeam(ApexPages.StandardController std) { mainAcctID = [select id, Account__c, Related_To_Account_Business_Plan__c,Related_To_Account_Business_Plan__r.primary_accountaccount__c from GSD_Account_Success_Delivery_Plan__c where id = :std.getId()]; } public list<HPE_Account_Team__c> getHPEAccountTeam(){ return [select Name, Account__r.Name,Name__r.Name, Phone__c, Email__c, Role__c, Role_Scope__c, Role_Scope_Description__c from HPE_Account_Team__c where Account__c = : mainAcctID.Account__c]; } }
and replace your object in the below mentioned code:
Regards
Medhya Mahajan
All Answers
Here's the test class for you :
Please ignore syntax errors if any
Regards
Medhya Mahajan
I am getting this error
Invalid type: Related_To_Account_Business_Plan__c at line 11 column 53
If I comment the line I am getting the error Constructor not defined: [ApexPages.StandardController].<Constructor>(Id) at line 16
and replace your object in the below mentioned code:
Regards
Medhya Mahajan
Anyways please mark it as solved to help others.