expectFileSystemException function

void expectFileSystemException(
  1. dynamic osErrorCode,
  2. void callback()
)

Expects the specified callback to throw a FileSystemException with the specified osErrorCode (matched against the exception's osError.errorCode).

osErrorCode may be an int, a predicate function, or a Matcher. If it is an int, it will be wrapped in an equality matcher.

See also:

  • ErrorCodes

Implementation

void expectFileSystemException(dynamic osErrorCode, void callback()) {
  expect(callback, throwsFileSystemException(osErrorCode));
}