• Kumar k 27
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
I need help on creating test class for the below class. I have written test class but which is covering only 5%. Please help us to get 80% code coverage.

public class ccweb{
public String cn{get; set;}
public Case cc{get;set;}
public Case c{get;set;}
private final Case mycase;
    public ccweb() {
    
      
    }
    public Case getCase() {
        return mycase;
    }
public ccweb(apexpages.StandardController controller){
 
      this.cc = (Case)controller.getRecord();
      cn = ApexPages.currentPage().getParameters().get('cn');
      mycase = [Select id,caseNumber from Case where caseNumber=:cn];
  }
 
    public PageReference save() {
       
        update mycase;
        return page.ThankyouPage;
    }
 
}