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
Mubarak Hussain 1Mubarak Hussain 1 

assert RecordType in Testclass

Hi all,
How to Assert the recordTypes in Tesclass.

list<case>clist=list<case>();
...
system.assertEquals(clist[0].recordTypeId,ExampleRecordtype.id);

But am getting expected and actual value different error.

Thanks
Amit Chaudhary 8Amit Chaudhary 8
Please share your code
Amit Chaudhary 8Amit Chaudhary 8
Please try below link
        system.assertEquals(clist[0].recordTypeId , properties.Example1.id);
Please let us know if this will help u