I have the following setup method:
@testSetup static void settingUp(){
Case exampleCase = new Case(Status='Imminent');
insert exampleCase;
}
static testMethod void testStatus(){
Case c = [SELECT Id, Status FROM Case WHERE Id = :exampleCase.Id];
System.assertEquals('Imminent',c.Status);
}
I have tried this however I get the following error:
Variable does not exist: exampleCase.Id
How can I refer to the original case I inserted? Thanks!