+ Start a Discussion
Linga_RaminLinga_Ramin 

I was working on Test class and unable to cover below lines

User-added image
Meghna Vijay 7Meghna Vijay 7
Hi,
pVVersionStringId is null. Make sure that it is not null .

Thanks
 
Deepali KulshresthaDeepali Kulshrestha
Hi,

It looks like you are getting "pVVersionId" null  so please set the attribute in the Page Reference in Test class to get the id in apex class.
You can use this code to set the parameters in your VF page from Test class.
 Test.setCurrentPageReference(new PageReference('Page.YourVFPageName')); 
 System.currentPageReference().getParameters().put('pVVersionId', value); 

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks and Regards,
Deepali Kulshrestha