You need to sign in to do that
Don't have an account?
vara sree
how to write test class for the below code page controller
public with sharing virtual class OrderPageControllerBase {
private OrderComponentControllerBase myComponentController;
public virtual OrderComponentControllerBase getOrderComponentController() {
return myComponentController;
}
public virtual void setComponentController(OrderComponentControllerBase_SIND compController) {
myComponentController = compController;
}
public OrderPageControllerBase getThis() {
return this;
}
public NA_Order__c myOrder {get; set {
myOrder = value;
if(myOrder.Id != null) {
myOrder = [SELECT Id, Name,
CurrencyIsoCode,
Order_Type__c,
Order_Status__c,
Order_Date__c,
SAP_Order_ID__c,
PO_Number__c,
PO_Date__c,
CreatedBy.Name,
LastModifiedBy.Name,
Ship_Via__c,
Sold_To_ID__c,
Account__c,
Sold_To_Address__c,
Ship_To_ID__c,
Contact_Attention__c,
Ship_To_Address__c,
Ship_To__c,
Account__r.Name,
RecordTypeId,
CreatedDate,
LastModifiedDate,
Notes__c FROM NA_Order__c WHERE Id =: myOrder.Id];
}
}
}
}
private OrderComponentControllerBase myComponentController;
public virtual OrderComponentControllerBase getOrderComponentController() {
return myComponentController;
}
public virtual void setComponentController(OrderComponentControllerBase_SIND compController) {
myComponentController = compController;
}
public OrderPageControllerBase getThis() {
return this;
}
public NA_Order__c myOrder {get; set {
myOrder = value;
if(myOrder.Id != null) {
myOrder = [SELECT Id, Name,
CurrencyIsoCode,
Order_Type__c,
Order_Status__c,
Order_Date__c,
SAP_Order_ID__c,
PO_Number__c,
PO_Date__c,
CreatedBy.Name,
LastModifiedBy.Name,
Ship_Via__c,
Sold_To_ID__c,
Account__c,
Sold_To_Address__c,
Ship_To_ID__c,
Contact_Attention__c,
Ship_To_Address__c,
Ship_To__c,
Account__r.Name,
RecordTypeId,
CreatedDate,
LastModifiedDate,
Notes__c FROM NA_Order__c WHERE Id =: myOrder.Id];
}
}
}
}
The developer forums are for questions aroudn specific problems you are having and not requests for code to be written for free. You should include what attempt you have made along with any specific errors you are receiving.
If it is getting started on writing a test class I would refer you to the article here (https://developer.salesforce.com/page/An_Introduction_to_Apex_Code_Test_Methods) which goes over writing tests in a great level of detail.