Example #1
0
        public void ThrowsArgumentNullException_When_KeyIsInvalid(string key)
        {
            // arrange / act
            var action = new Action(() => _sut.RemoveItem(key));

            // assert
            Assert.Throws <ArgumentNullException>(action);
        }
Example #2
0
        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");
        }
Example #3
0
 public async ValueTask RemoveItem(string key)
 {
     LocalStorageService.RemoveItem(key);
     await Task.Delay(1);
 }