function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
kristhoper saysonkristhoper sayson 

How to assert pagereference

Im working on testting my class and i want to assert this 2 method
how can i assert the pagereference. Here is my code:
public PageReference backToSearchResult(){
        PageReference pageRef = new PageReference('/apex/AsLi_AssetSearch');
        return pageRef;
    }
    
    public PageReference updateViewCount() {
        ipAsset.AsLi_Asset_View_Count__c = ipAsset.AsLi_Asset_View_Count__c + 1;
        update ipAsset;
        
        return null;
    }

Thanks
Mark


 
Dushyant SonwarDushyant Sonwar
Hi kristopher,
See this..
https://developer.salesforce.com/forums/ForumsMain?id=906F00000008wsVIAQ
kristhoper saysonkristhoper sayson
Thankk for the help im very appriciate it. Thanks agan