public void TestLogDAO_InsertListLog() { Assert.AreEqual(logModels.Count, logDAO.InsertListLog(logModels)); Assert.AreEqual(2, logDAO.GetLogsBySiteId(logModels[0].Site_id).Count); //按照插入的log的site_id进行查询看是否查到 logDAO.DeleteLogsBySite(88); //清除插入数据 }
public void TestLogDAO_DeleteLogsBySite() { Assert.AreEqual(2, logDAO.DeleteLogsBySite(logModels[0].Site_id)); Assert.AreEqual(0, logDAO.GetLogById(logModels[0].Site_id).Site_id);//取一下logmodel[0],看取得的是否为空log }