我不知道怎么写Extension的Apex类的TestClass
谁能帮我一下。
下面是我的Apex 类
public with sharing class ExtendObject {
private final SObject so;
public ExtendObject (ApexPages.StandardController controller)
{
this.so = controller.getRecord ();
}
}
还有下面是使用extension类的,Visualforce页面的代码
<apex:page standardController="Custom_Object__c" extensions="ExtendObject" showHeader="false" sidebar="false" standardStylesheets="false" >
<apex:tabPanel switchType="client" selectedTab="tab4" id="theTabPanel" rendered="{!Custom_Object__c.Custom_Field__c != null}">
<apex:tab label="Details 4" name="tab4" id="tab4">
<apex:iframe src="http://website.com?this={!Custom_Object__c.Custom_Field__c}&Accept=1" scrolling="true" id="propIframe4"/>
</apex:tab>
<apex:tab label="Details 1" name="tab1" id="tab1">
<apex:iframe src="http://website.com?this={!Custom_Object__c.Custom_Field__c}" scrolling="true" id="propIframe1"/>
</apex:tab>
<apex:tab label="Details 2" name="tab2" id="tab2">
<apex:iframe src="http://website.com?this={!Custom_Object__c.Custom_Field__c}" scrolling="true" id="propIframe2"/>
</apex:tab>
<apex:tab label="Details 3" name="tab3" id="tab3">
<apex:iframe src="http://website.com?this={!Custom_Object__c.Custom_Field__c}" scrolling="true" id="propIframe3"/>
</apex:tab>
<apex:tab label="Details 5" name="tab5" id="tab5">
<apex:iframe src="http://website.com?this={!Custom_Object__c.Custom_Field__c}" scrolling="true" id="propIframe5"/>
</apex:tab>
</apex:tabPanel>
</apex:page>