Reset limits around the act
Test.startTest() gives the code under test a fresh set of governor limits.
Your task
Finish the helper so it counts only the queries the service runs, even when setup used the whole query limit.
@IsTest
public class AS_97398297DFBD_LimitTests {
public static Integer measureFreshQueries(Integer count) {
return null;
}
@IsTest
static void measuresWork() {
Assert.areEqual(2, measureFreshQueries(2));
}
}Requirements
- measuresZeroFreshQueries should pass
- measuresOneFreshQuery should pass
- measuresSevenFreshQueries should pass
- closesTheFreshWindow should pass
- returnsWhatLimitsReports should pass