status static method

void status(
  1. Problem problem,
  2. int expected
)

Asserts problem carries the expected status.

Implementation

static void status(Problem problem, int expected) {
  if (problem.status != expected) {
    throw AuthAssertionError(
      'expected status $expected but got ${problem.status}',
    );
  }
}