Beispiel #1
0
        public void GetFolders()
        {
            using (var dir = new TempDirectory())
            {
                var folder = new FileSystemFolder(dir.Location);
                Assert.AreEqual(0, folder.GetFolders().Count());

                File.WriteAllText(Path.Combine(dir.Location, "11.txt"), string.Empty);

                dir.CopyFileFromResources("Content.zip");
                Directory.CreateDirectory(Path.Combine(dir.Location, "22.txt"));
                Directory.CreateDirectory(Path.Combine(dir.Location, "33"));

                var folders = folder.GetFolders().ToArray();
                CollectionAssert.AreEquivalent(new[] { "22.txt", "33", "Content.zip" }, folders.Select(i => i.Name).ToArray());
            }
        }
Beispiel #2
0
        public void Ctor()
        {
            var folder = new FileSystemFolder(@"d:\11\22");

            Assert.AreEqual("22", folder.Name);
        }