I have to write a test class for a controller . It is a component's controller. The component is called in a VF page in below fashion
<apex:page standardController="Obj1__c" extensions="ControllerForVFPage" id="apppage" standardStylesheets="false">
<c:AttachmentComp rendered="{!isActive}" ></c:AttachmentComp>
Now the component is as below
<apex:component controller="controllerForComponent" allowDML="true" access="global" >
Controller code for component
public class controllerForComponent{
public controllerForComponent(){
ObjId = apexpages.currentpage().getparameters().get('id');
Page = apexpages.currentpage().getparameters().get('PageName');
}
What is the possible way of passing object id in the components controller test class .