public void DoesNotRestrictAccessForDifferentExceptions() { ErrorHandlingService.TryHandleDeprecationError(exception); AccessRestrictionStorage.DidNotReceive().SetApiOutdated(); AccessRestrictionStorage.DidNotReceive().SetClientOutdated(); }
public async Task DoesNothingWhenNoWorkspacesAreFetched() { DataSource.Workspaces.GetAll().Returns(Observable.Return(new List <IThreadSafeWorkspace>())); ViewModel.TryAgain.Execute(); TestScheduler.Start(); View.DidNotReceive().Close(); AccessRestrictionStorage.DidNotReceive().SetNoWorkspaceStateReached(Arg.Any <bool>()); }
public async Task DoesNothingWhenNoWorkspacesAreFetched() { DataSource.Workspaces.GetAll().Returns(Observable.Return(new List <IThreadSafeWorkspace>())); await ViewModel.TryAgain(); await NavigationService.DidNotReceive().Close(Arg.Is(ViewModel)); AccessRestrictionStorage.DidNotReceive().SetNoWorkspaceStateReached(Arg.Any <bool>()); }
internal void ReturnsTrueButDoesNotNavigateOrSetUnathorizedAccessFlagWhenTheApiTokenCannotBeExtractedFromTheRequest() { var request = Substitute.For <IRequest>(); request.Headers.Returns(new HttpHeader[0]); var exceptionWithoutApiToken = new UnauthorizedException(request, Substitute.For <IResponse>()); var handled = ErrorHandlingService.TryHandleUnauthorizedError(exceptionWithoutApiToken); handled.Should().BeTrue(); NavigationService.DidNotReceive().Navigate <TokenResetViewModel>(); AccessRestrictionStorage.DidNotReceive().SetUnauthorizedAccess(Arg.Any <string>()); }
public void DoesNotRestrictAccessForDifferentExceptions() { ErrorHandlingService.TryHandleUnauthorizedError(exception); AccessRestrictionStorage.DidNotReceive().SetUnauthorizedAccess(Arg.Any <string>()); }