Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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));
        }
Ejemplo n.º 4
0
        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);
        }
Ejemplo n.º 5
0
        public void DirectoryLinkWriter_Write_SheetDirectoryIsHyperlink()
        {
            directoryWriter = SetupSolutionDirectoryWriter();
            myTestDirectory = getSolutionDirectory();

            directoryWriter.Write();
            string pathToHyperlink = directoryWriter.GetHyperlinkPath("A1");

            Assert.That(pathToHyperlink, Is.EqualTo(myTestDirectory.FullName));
        }