public async System.Threading.Tasks.Task DeleteUser()
        {
            Assert.AreNotEqual(Guid.Empty, company.CompanyId);

            User user = new User();

            user.EMail          = "*****@*****.**";
            user.IsCompanyAdmin = true;
            user.CompanyId      = company.CompanyId;
            user.FirstName      = "Miro";
            user.FamilyName     = "Furda";

            await service.CreateUserAsync(user);

            Assert.IsNotNull(user.UserId);

            await service.DeleteUserAsync(user);

            List <User> users = await service.ReadAllUsersForCompanyAsync(company.CompanyId);

            Assert.AreEqual(0, users.Count());
        }
 private async Task OnDeleteUser()
 {
     this.DeleteConfirmation.Raise(new Confirmation
     {
         Title   = Resources.DeleteUserConfirmation_Title,
         Content = Resources.DeleteUserConfirmation_Content
     }, async(dialog) =>
     {
         if (dialog.Confirmed)
         {
             try
             {
                 await _adminService.DeleteUserAsync(SelectedUser);
                 Users.Remove(SelectedUser);
                 SelectedUser        = null;
                 IsUserEditorVisible = false;
             }
             catch (TimeoutException timeoutEx)
             {
                 _eventAggregator.GetEvent <TimeoutErrorEvent>().Publish(timeoutEx);
             }
         }
     });
 }