You need to sign in to do that
Don't have an account?
need test class for apex class
Hi
Please help to write the TEST class for the following apex class:-
Please help to write the TEST class for the following apex class:-
public with sharing class Controller_QuotePage { public Opportunity qt {get; set;} public List<Opportunity_Product__c> theLineItems {get; set;} public Controller_QuotePage(ApexPages.StandardController controller) { Id quoteID = ((Opportunity) controller.getRecord()).Id; loadQuote(quoteId); loadQuoteLineItems(quoteId); } public List<Opportunity_Product__c> getLineItems(){ return theLineItems; } private void loadQuote(String quoteId) { this.qt = [Select Id, Name FROM Opportunity where Id=:quoteId]; } private void loadQuoteLineItems(String quoteId) { this.theLineItems = [SELECT Id, Name FROM Opportunity_Product__c WHERE Opportunity__c =: quoteId]; } }
Please find this code. Hope it helps for you.
Please choose the best answer, if this helps you.
Thank you