I have the following Apex Class that I need to write a test class for. I've never done this before and rather new at this. Can someone offer pointers for this test class?
public class CurrentRecordIdController{
public String currentRecordId {get;set;}
public String parameterValue {get;set;}
public Lead lead{get;set;}
public String data {get;set;}
public Blob mac {get;set;}
public String sig {get;set;}
public String url {get;set;}
public CurrentRecordIdController(ApexPages.StandardController controller) {
currentRecordId = ApexPages.CurrentPage().getparameters().get('id');
lead = [Select Id, Name, Email, Company from Lead where Id =: currentRecordId ];
parameterValue = ApexPages.CurrentPage().getparameters().get('nameParam');
data = currentRecordId;
mac = Crypto.generateMac('HMacSHA256', Blob.valueOf(data), Blob.valueOf('key'));
sig = EncodingUtil.urlEncode(EncodingUtil.base64Encode(mac), 'UTF-8');
url = 'https://mysite.com/123456?lid=' + currentRecordId + '&signature=' + sig;
}
}
Thank you!