Example #1
0
        public void dataBaseConnectTest()
        {
            // TODO: 初始化为适当的值
            target = new NHibernateData();

            UserData studentInfo = target.GetUserDataByNum("2009051729");
            string password = studentInfo.Password;
            Assert.AreEqual("051729", password);
        }
Example #2
0
        public void saveDataTest()
        {
            // TODO: 初始化为适当的值
            ISession session = new NHibernateHelper().GetSession();
            target = new NHibernateData();
            UserData studentInfo = new UserData("510", "学生", "开个户", "计划公开", "45", "男", "hgh", "hj", "dghsgh");

            //存储数据
            target.CreateStudentData(studentInfo);
            UserData studentdata = target.GetUserDataByNum("510");
            string name = "";

            if(null != studentdata)
                name = studentdata.Name;
            Assert.AreEqual("开个户", name);
        }