public void ResourceProvider_FolderExists_WorkWithTransposedEmbeddedResources() { var provider = new Core.Provider.ResourceProvider(new[] { typeof(Anchor).Assembly }); provider.FolderExists("Content").Should().BeTrue(); provider.FolderExists("Contet").Should().BeFalse(); }
public void ResourceProvider_GetManifestResourceName_WorkWithEmbeddedResources() { var provider = new Core.Provider.ResourceProvider(new[] { typeof(Anchor).Assembly }); provider.GetManifestResourceName(@"\folder\Class1.txt").Should().NotBeNullOrWhiteSpace(); provider.GetManifestResourceName(@"folder/Class1.txt").Should().NotBeNullOrWhiteSpace(); provider.GetManifestResourceName(@"/folder/Class1.txt").Should().NotBeNullOrWhiteSpace(); provider.GetManifestResourceName(@"Class1.css").Should().NotBeNullOrWhiteSpace(); provider.GetManifestResourceName(@"folder").Should().BeNullOrWhiteSpace(); }
public void ResourceProvider_FileExists_WorkWithTransposedEmbeddedResources() { var provider = new Core.Provider.ResourceProvider(new[] { typeof(Anchor).Assembly }); provider.FileExists(@"Content\Class1.txt").Should().BeTrue(); provider.FileExists(@"\Content\Class1.txt").Should().BeTrue(); provider.FileExists(@"Content/Class1.txt").Should().BeTrue(); provider.FileExists(@"/Content/Class1.txt").Should().BeTrue(); provider.FileExists(@"Scripts/Class1.js").Should().BeTrue(); provider.FileExists(@"/Scripts/Class1.js").Should().BeTrue(); }
public void ResourceProvider_FileExists_WorkWithEmbeddedResources() { var provider = new Core.Provider.ResourceProvider(new[] { typeof(Anchor).Assembly }); provider.FileExists(@"folder\Class1.txt").Should().BeTrue(); provider.FileExists(@"\folder\Class1.txt").Should().BeTrue(); provider.FileExists(@"folder/Class1.txt").Should().BeTrue(); provider.FileExists(@"/folder/Class1.txt").Should().BeTrue(); provider.FileExists(@"folder.with.dots/Class1.js").Should().BeTrue(); provider.FileExists(@"/folder.with.dots/Class1.js").Should().BeTrue(); provider.FileExists(@"folder/with.dots/Class1.js").Should().BeFalse(); provider.FileExists(@"/folder/with.dots/Class1.js").Should().BeFalse(); provider.FileExists(@"Class1.css").Should().BeTrue(); provider.FileExists(@"folder").Should().BeFalse(); }
public void ResourceProvider_GetResourceFolder_WorkWithTransposedEmbeddedResources() { var provider = new Core.Provider.ResourceProvider(new[] { typeof(Anchor).Assembly }); provider.GetResourceFolder("Content").Should().NotBeNull(); provider.GetResourceFolder("Scripts").Should().NotBeNull(); }
public void ResourceProvider_GetResourceFolder_WorkWithEmbeddedResources() { var provider = new Core.Provider.ResourceProvider(new[] { typeof(Anchor).Assembly }); provider.GetResourceFolder("folder").Should().NotBeNull(); provider.GetResourceFolder("flder").Should().BeNull(); }
public void ResourceProvider_GetResourceFile_WorkWithTransposedEmbeddedResources() { var provider = new Core.Provider.ResourceProvider(new[] { typeof(Anchor).Assembly }); provider.GetResourceFile(@"folder\Class1.txt").Should().Be(provider.GetResourceFile(@"Content\Class1.txt")); provider.GetResourceFile(@"\folder\Class1.txt").Should().Be(provider.GetResourceFile(@"\Content\Class1.txt")); provider.GetResourceFile(@"folder/Class1.txt").Should().Be(provider.GetResourceFile(@"Content/Class1.txt")); provider.GetResourceFile(@"/folder/Class1.txt").Should().Be(provider.GetResourceFile(@"/Content/Class1.txt")); provider.GetResourceFile(@"folder.with.dots/Class1.js").Should().Be(provider.GetResourceFile(@"Scripts/Class1.js")); provider.GetResourceFile(@"/folder.with.dots/Class1.js").Should().Be(provider.GetResourceFile(@"/Scripts/Class1.js")); }
public void ResourceProvider_GetResourceFile_WorkWithEmbeddedResources() { var provider = new Core.Provider.ResourceProvider(new[] { typeof(Anchor).Assembly }); provider.GetResourceFile(@"folder\Class1.txt").Should().NotBeNull(); provider.GetResourceFile(@"\folder\Class1.txt").Should().NotBeNull(); provider.GetResourceFile(@"folder/Class1.txt").Should().NotBeNull(); provider.GetResourceFile(@"/folder/Class1.txt").Should().NotBeNull(); provider.GetResourceFile(@"folder.with.dots/Class1.js").Should().NotBeNull(); provider.GetResourceFile(@"/folder.with.dots/Class1.js").Should().NotBeNull(); provider.GetResourceFile(@"folder/with.dots/Class1.js").Should().BeNull(); provider.GetResourceFile(@"/folder/with.dots/Class1.js").Should().BeNull(); provider.GetResourceFile(@"Class1.css").Should().NotBeNull(); provider.GetResourceFile(@"folder").Should().BeNull(); }