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
Jacek Bieńkowski 6Jacek Bieńkowski 6 

Superbadge - Apex Specialist

I've finally completed step 4. Test automation logic. 

It took me long, because of incorrect requirement in spec. 
The requirement is: 
When an existing maintenance request of type Repair or Routine Maintenance is Closed, you create a new maintenance request for a future routine checkup. [...] The Subject should not be null and [...]

Unfortunatelly test checks something completelly different. See below line from error log:  
Execute Anonymous: System.assertEquals(402, [select count() from Case where subject like '%AMC Spirit%']);
Moreover, the error information from within Trailhead page suggests, that this is a problem with bulk processing. 

<joke> So, if you want to finish step 4 of those badge you need to set the subject to AMC Spirit in case created by your trigger </joke>


 
Sudhir Kumar 19Sudhir Kumar 19
It did not work for me. Any help appreciated!
shweta chadha 4shweta chadha 4
@jacek, can youplease share your code.
Nirdesh_BhattNirdesh_Bhatt
Can you Please share code of Apex superbadge Section 4 
Sree valli 12Sree valli 12
can you please share code for challenge 1