private static string GetDirectoryName()
        {
            ReportGroup    reportGroup = TestReportCreate.GetMonthReportGroup();
            ReportFileBase file        = new MonitorReportFile(reportGroup);

            return(Path.GetDirectoryName(file.ReportInfo.FullName));
        }
Beispiel #2
0
        public void TestSaveAndDeleteReportInfo()
        {
            ReportGroup    reportGroup = TestReportCreate.GetMonthReportGroup();
            ReportFileBase file        = new MonitorReportFile(reportGroup);

            Assert.IsTrue(ReportConfigDal.SaveReportInfo(file.ReportInfo));

            int fileRec;

            using (var db = new DW_iSecureCloud_EmptyEntities())
            {
                fileRec = db.T_REPORT_COLLECTION.Where(r => r.Name == file.ReportInfo.Name).ToList().Count;
            }
            Assert.IsTrue(fileRec > 0);

            Assert.IsTrue(ReportConfigDal.DeleteOldReportInfo(file.ReportInfo.Name));
            using (var db = new DW_iSecureCloud_EmptyEntities())
            {
                fileRec = db.T_REPORT_COLLECTION.Where(r => r.FileFullName == file.ReportInfo.FullName).ToList().Count;
            }
            Assert.IsTrue(fileRec == 0);
        }