예제 #1
0
        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);
        }
예제 #3
0
        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);
        }