ApexSensei

Drills Unit testing

Assert service outcomes

A test needs an expected value to compare with the real result.

Your task

Finish verify so the test fails whenever the service label is not the expected one.

@IsTest
public class AS_A666623FE257_PriorityTests {
    public static String verify(Integer score, String expected) {
        String actual = AS_A666623FE257_Priority.label(score);
        return null;
    }

    @IsTest
    static void urgentScore() {
        verify(80, 'Urgent');
    }
}

Requirements

  1. verifiesUrgentEdge should pass
  2. verifiesStandardScore should pass
  3. verifiesNullScore should pass
  4. catchesWrongUrgentLabel should pass
  5. catchesWrongStandardLabel should pass

Sign in to open this drill