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
udayarangareddy mekalaudayarangareddy mekala 

Below code how to do the code coverage

For this code how to do the code coverage
        if(cscount==1){
case=[SELECT ID,Assigned_To__c,Tier_Level__c,Notes_c FROM CASE WHERE ID=:csid];         
            case1.Notes__c='';
            if(case1.Assigned_To__c != null)
obj = [SELECT ID,Name from user where id=: case1.Assigned_To__c];

Thanks&Regards
Rangareddy
}





 
pconpcon
You would want to insert the data needed to make cscount equal one and make sure you have case and user created to make sure that your trigger does not get an assignment error.  I would recommend reading over these articles [1] [2] [3] [4] to help you understand testing more.  If you have any specific issues with your test, feel free to include your test code and we can help you with that.

NOTE: When adding code, please use the "Add a code sample" button (icon <>) to increase readability and make it easier to reference.

[1] http://www.sfdc99.com/2013/05/14/how-to-write-a-test-class/
[2] http://pcon.github.io/presentations/testing/
[3] http://blog.deadlypenguin.com/blog/2014/07/23/intro-to-apex-auto-converting-leads-in-a-trigger/
[4] http://blog.deadlypenguin.com/blog/testing/strategies/