示例#1
0
        public void DemoUserRepository_GetUser_Should_Return_Null_On_Invalid_User()
        {
            rep = new UserDAO();
            User user = rep.GetUser("hallo");

            Assert.IsNull(user);
        }
示例#2
0
        public void DemoUserRepository_GetUser_Should_Return_Data_On_Valid_User()
        {
            rep = new UserDAO();
            User user = rep.GetUser("Robert");

            Assert.IsNotNull(user);
            Assert.AreEqual("Robert", user.Login);
        }
示例#3
0
        public void DemoUserRepository_GetUsers_Should_Return_Values()
        {
            rep = new UserDAO();
            List <User> users = rep.GetUsers().ToList();

            Assert.IsNotNull(users);
            Assert.AreNotEqual(0, users.Count);
        }
示例#4
0
文件: UserBL.cs 项目: akio4800/fh
 public UserBL()
 {
     this.DB = new UserDAO();
 }