• FORTE Rénald
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies
Hi i have a class

public with sharing class PPS_Create_casecommentsfromcase {
//public  final Case ca;
public list<case> newCases{get;set;}
public string history{get;set;}
public PPS_Create_casecommentsfromcase(ApexPages.StandardController stdcontroller) {
Id ids= ApexPages.currentPage().getParameters().get('id');
    
    newcases = new list<case>();
    newcases=[select id,PPS_Troubleshooting_Steps__c from case where id=:ids];
                    for(case c:newCases )
                    {
                    
                    if(c.PPS_Troubleshooting_Steps__c==null)
                    
                    history= '';
                    else
                    
                    history=c.PPS_Troubleshooting_Steps__c;
                                
         
       }              

    }

}


I have writen testclass for above class 


@isTest(seealldata=false)
private class PPS_Test_Create_casecommentsfromcase {

private static testMethod void testcasecomment(){
string history;
Case c1 = new Case();
        c1.Status = 'New';
        c1.Origin = 'Phone';
        c1.PPS_Troubleshooting_Steps__c ='test';     
        insert c1;


Case c=[select id,PPS_Troubleshooting_Steps__c from case where id=:c1.id];
history= c.PPS_Troubleshooting_Steps__c ;
Test.startTest();
ApexPages.StandardController sc = new ApexPages.standardController(c1);
PPS_Create_casecommentsfromcase testcoment= new  PPS_Create_casecommentsfromcase(sc);
//List<case> caseTest = testcoment.c; 
Test.StopTest();
}
}

but here problem is below lines are not covering so can you help to make it as 100% present 63% covered.

  if(c.PPS_Troubleshooting_Steps__c==null)
                    
                    history= '';
                    else
                    
                    history=c.PPS_Troubleshooting_Steps__c;
                                
         
       }              


Can canbody help this?



Regards,
Isha

 
Hi,

I am trying to upload a Change set from our Sandbox to Live environment but it has failed several times with the below error message.

Change set: Phase 1 Build v1.1 (04t11000000E4o9)
Organization: 1 (Developer Sandbox) (00D1100000BzD1R)
User: Richard Gerrard (005w0000003tgPB)
Error Number: 364259182-59394 (637934141)

I've tried cloning the change set & also reducing it down to a single component but every time it fails.

Any idea why?

Thanks,
Richard