private DocInfo SetupForSavingTests() { doc.TargetDirectory = env; doc.DocType = InfoType.Regular; if (File.Exists(doc.GetDestinationFile())) { File.Delete(doc.GetDestinationFile()); } if (Directory.Exists(doc.GetDestinationFile())) { Directory.Delete(doc.GetDestination()); } string yearpath = doc.YearPath(); string monthpath = doc.MonthPath(); string daypath = doc.DayPath(); if (Directory.Exists(daypath)) { Directory.Delete(daypath); Directory.Delete(monthpath); Directory.Delete(yearpath); } return(doc); }
public void InfoTypeTest() { doc = SetupForSavingTests(); string imagepath = doc.SaveImage(); Assert.IsTrue(Directory.Exists(doc.GetDestination())); }