Esempio n. 1
0
        public void DeleteValidAccount()
        {
            UserManagement userManage = new UserManagement();
            User user = userManage.Login(new User { Email = "*****@*****.**", Password = "******" });

            AccountManagement accManage = new AccountManagement();
            Account[] accounts = accManage.GetAccounts(user).ToArray();

            if (accounts == null || accounts.Count() < 1)
                Assert.Fail("No account to delete.");

            accManage.DeleteAccount(accounts[0]);
        }
Esempio n. 2
0
 public void DeleteInvalidAccount()
 {
     AccountManagement accManage = new AccountManagement();
     accManage.DeleteAccount(new Account { AccountId = 0 });
 }
Esempio n. 3
0
 public void DeleteAccount(Account account)
 {
     try
     {
         AccountManagement accountManagement = new AccountManagement();
         accountManagement.DeleteAccount(account);
     }
     catch (ModelException ex)
     {
         CapitalError error = new CapitalError(ex);
         throw new FaultException<CapitalError>(error, error.Message);
     }
     catch (Exception)
     {
         return;
     }
 }