public void DirectoryLinkWriter_SetDate_IsDateSetIsTrue() { directoryWriter = SetupSolutionDirectoryWriter(); directoryWriter.LinkDate = DateTime.Today; Assert.That(directoryWriter.IsDateSet, Is.True); }
public void DirectoryLinkWriter_Write_SheetDirectoryIsHyperlink() { directoryWriter = SetupSolutionDirectoryWriter(); myTestDirectory = getSolutionDirectory(); directoryWriter.Write(); string pathToHyperlink = directoryWriter.GetHyperlinkPath("A1"); Assert.That(pathToHyperlink, Is.EqualTo(myTestDirectory.FullName)); }
public void DirectoryLinkWriter_WriteWithNullDate_SheetHasFilesInDirectory() { directoryWriter = SetupSolutionDirectoryWriter(); IEnumerable<string> fileNames = getFileNames(directoryWriter.DirectoryPath); directoryWriter.Write(); List<string> filesInSheet = getFilesInSheet(fileNames, 2); Assert.That(filesInSheet, Is.EquivalentTo(fileNames)); Console.WriteLine(directoryWriter.DirectoryPath); }
public void DirectoryLinkWriter_WriteWithDate_SheetOnlyHasFilesCreatedOnDate() { directoryWriter = SetupSolutionDirectoryWriter(); directoryWriter.LinkDate = new DateTime(2014, 8, 14); IEnumerable<string> fileNames = getFileNamesCreatedOnDate(directoryWriter.DirectoryPath); directoryWriter.Write(); List<string> filesInSheet = getFilesInSheet(fileNames, 2); Assert.That(filesInSheet, Is.EquivalentTo(fileNames)); }
public void DirectoryLinkWriter_WriteWithDate_SheetHasDirectoryAndSearchDate() { directoryWriter = SetupDirectoryWriter(); directoryWriter.LinkDate = DateTime.Today; string strWriterDate = directoryWriter.LinkDate.ToString(); string[,] heading ={ { Directory.GetCurrentDirectory(), strWriterDate} }; directoryWriter.Write(); Assert.That(linkSheet.GetRange("A1", "B1"), Is.EqualTo(heading)); }
public void DirectoryLinkWriter_Write_SheetHasFirstSubdirectoryAfterFileList() { directoryWriter = SetupSolutionDirectoryWriter(); SetupSubDirectoryTest(); // Execute directoryWriter.Write(); GetSubDirectoryAndSubFilesInSheet(); Assert.That(subFilesInSheet, Is.EquivalentTo(subFiles)); Assert.That(subDirectoryInSheet, Is.EqualTo(subDirectories[0].FullName)); Console.WriteLine(directoryWriter.DirectoryPath); }
protected override IOfficeWriter MakeSheetWriter() { DirectoryLinkWriter linkWriter = new DirectoryLinkWriter(DirectoryPath); return linkWriter; }