public async ThreadingTask SetsTheUnauthorizedAccessFlag() { var exception = new UnauthorizedException(request, response); ErrorHandlingService.TryHandleUnauthorizedError(Arg.Any <UnauthorizedException>()).Returns(true); ProgressSubject.OnError(exception); ErrorHandlingService.Received().TryHandleUnauthorizedError(Arg.Is(exception)); }
public void SetsTheOutdatedApiVersionFlag() { var exception = new ApiDeprecatedException(request, response); ErrorHandlingService.TryHandleDeprecationError(Arg.Any <ApiDeprecatedException>()).Returns(true); ProgressSubject.OnError(exception); ErrorHandlingService.Received().TryHandleDeprecationError(Arg.Is(exception)); ErrorHandlingService.DidNotReceive().TryHandleUnauthorizedError(Arg.Is(exception)); }