public void ThrowsArgumentNullException_When_KeyIsInvalid(string key) { // arrange / act var action = new Action(() => _sut.RemoveItem(key)); // assert Assert.Throws <ArgumentNullException>(action); }
protected async override Task HandleAsync(LogoutAction action, IDispatcher dispatcher) { await localStorage.RemoveItem("branch.name"); await localStorage.RemoveItem("user.name"); await localStorage.RemoveItem("token"); api.BranchId = Guid.Empty; uriHelper.NavigateTo("/login"); }
public async ValueTask RemoveItem(string key) { LocalStorageService.RemoveItem(key); await Task.Delay(1); }