public void GoodLogin() { SqlUserManager sqm = new SqlUserManager(); bool expected = true; sqm.AddUser("LoginTest", "password"); bool actual = sqm.Login("LoginTest", "password"); sqm.DeleteUserByUsername("LoginTest"); Assert.AreEqual(expected, actual); }
public void AddUser() { SqlUserManager sqm = new SqlUserManager(); int PreCount = sqm.Count(); sqm.AddUser("testUser", "password"); int PostCount = sqm.Count(); Assert.AreEqual((PreCount + 1), PostCount); }
public void AddInvaliduser() { SqlUserManager sqm = new SqlUserManager(); int PreCount = sqm.Count(); sqm.AddUser("", "password"); int PostCount = sqm.Count(); Assert.AreEqual(PreCount, PostCount); }
public void DeleteUserByUsername() { SqlUserManager sqm = new SqlUserManager(); sqm.AddUser("deleteTest", "password"); int PreCount = sqm.Count(); sqm.DeleteUserByUsername("deleteTest"); int PostCount = sqm.Count(); Assert.AreEqual(PreCount-1, PostCount); }