Пример #1
0
        public void UnpackToFolderTestFolders()
        {
            string fileName1 = @"test1.txt";
            string fileName2 = @"somefolder\And another with spaces\test1.txt";

            // create the file
            string fileLocation1 = CreateDummyFileUnderRootFolder(fileName1);
            string fileLocation2 = CreateDummyFileUnderRootFolder(fileName2);

            FileDependency fd1 = new EmbeddedFileDependency(fileName1, fileLocation1);
            FileDependency fd2 = new EmbeddedFileDependency(fileName2, fileLocation2);

            fd1.UnpackToFolder(_rootFolderNameToExtractTo);
            fd2.UnpackToFolder(_rootFolderNameToExtractTo);

            // just make sure the files are there
            Assert.IsTrue(File.Exists(Path.Combine(_rootFolderNameToExtractTo, fileName1)));
            Assert.IsTrue(File.Exists(Path.Combine(_rootFolderNameToExtractTo, fileName2)));
        }
Пример #2
0
        public void UnpackToFolderTestNoFolders()
        {
            string fileName = @"test1.txt";

            // create the file
            string fileLocation = CreateDummyFileUnderRootFolder(fileName);

            FileDependency fd = new EmbeddedFileDependency(fileName, fileLocation);

            fd.UnpackToFolder(_rootFolderNameToExtractTo);

            // just make sure the file is there
            Assert.IsTrue(File.Exists(Path.Combine(_rootFolderNameToExtractTo, fileName)));
        }