Пример #1
0
        public void DeleteAccountTest()
        {
            var db = new RentItTestDatabase.RentItDatabaseDataContext();
            RentItClient target = new RentItClient();

            Account delAccount = new Account {
                UserName = "******",
                FullName = "Unit Testesen1",
                Email = "*****@*****.**",
                HashedPassword = "******"
            };
            target.CreateNewUser(delAccount);

            AccountCredentials credentials = new AccountCredentials {
                UserName = "******",
                HashedPassword = "******"
            };
            bool expected = true;
            bool actual;
            actual = target.DeleteAccount(credentials);
            Assert.AreEqual(expected, actual);

            CleanupCreateUser(credentials.UserName);
        }