public void TryGetDirInfo_without_slash() { var provider = new EmbeddedResourceFileSystem(this.GetType().Assembly, ""); IEnumerable <IFileInfo> files; provider.TryGetDirectoryContents(string.Empty, out files).ShouldBe(false); provider.TryGetDirectoryContents("file", out files).ShouldBe(false); provider.TryGetDirectoryContents("file.txt", out files).ShouldBe(false); }
public void TryGetDirInfo_with_no_matching_base_namespace() { var provider = new EmbeddedResourceFileSystem(this.GetType().Assembly, "Unknown.Namespace"); IEnumerable <IFileInfo> files; provider.TryGetDirectoryContents(string.Empty, out files).ShouldBe(false); provider.TryGetDirectoryContents("/", out files).ShouldBe(true); files.Count().ShouldBe(0); }
public void TryGetDirInfo_with_slash() { var provider = new EmbeddedResourceFileSystem(this.GetType().Assembly, "Resources"); IEnumerable <IFileInfo> files; provider.TryGetDirectoryContents("/", out files).ShouldBe(true); files.Count().ShouldBe(2); provider.TryGetDirectoryContents("/file", out files).ShouldBe(false); provider.TryGetDirectoryContents("/file/", out files).ShouldBe(false); provider.TryGetDirectoryContents("/file.txt", out files).ShouldBe(false); provider.TryGetDirectoryContents("/file/txt", out files).ShouldBe(false); }