public void TestLogDAO_UpdateListLog() { logDAO.InsertListLog(logModels); logModels[0].Log_Record = "ok"; //将插入的logmodel[0]的Log_Record字段改为ok logDAO.UpdateListLog(logModels); Assert.AreEqual("ok", logDAO.GetLogById(logModels[0].Id).Log_Record); //对比Log_Record字段是否发生改变 }
public void TestLogDAO_UpdateListLog() { logDAO.InsertListLog(logModels); logModels[0].Log_Record = "ok"; //将插入的logmodel[0]的Log_Record字段改为ok logModels[1].Is_error = false; //将logmodel[1]的is_error字段改为false logDAO.UpdateListLog(logModels); Assert.AreEqual("ok", logDAO.GetLogById(logModels[0].Id).Log_Record); //对比Log_Record字段是否发生改变 Assert.AreEqual(false, logDAO.GetLogById(logModels[1].Id).Is_error); logDAO.DeleteLogsBySite(88); //清除插入数据 }