public async Task TestDelete() { AccountRepository rp = new AccountRepository(); var user = new UserInfo { LoginName = "login", Password = "******", RoleString = "2,4", UserName = "******" }; await rp.AppendUser(user); var result = await rp.Remove(user.Id); Assert.IsTrue(result); }
public async Task TestAppendUser() { IAccountRepository rp = new AccountRepository(); var user = new UserInfo { LoginName = "login4", Password = "******", RoleString = "1,2,3", UserName = "******" }; user.Dump(); var result = await rp.AppendUser(user); Assert.IsTrue(result); Console.WriteLine("after inserted..."); user.Dump(); Assert.IsTrue(user.Id > 0); }