expectApiCalled method

void expectApiCalled(
  1. String apiName,
  2. int times
)

Implementation

void expectApiCalled(String apiName, int times) {
  final actual = context.apiOverlay.callCount(apiName);
  if (actual != times) {
    throw EnsembleTestFailure(
      'Expected API "$apiName" to be called $times times, but it was called $actual times. '
      '${apiCallSummary()}',
    );
  }
}