public void MatchingFiles_ReturnsCorrectFile()
        {
            // Arrange
            var themesImpl = new ThemesImplementation(scopeStorage: new ScopeStorageDictionary(),
                                                      vpp: GetVirtualPathProvider("themes", new Dir(@"nomatchingfiles", "foo.cs")));

            // Act
            var bar = themesImpl.FindMatchingFile(@"themes\nomatchingfiles", "bar.cs");
            var foo = themesImpl.FindMatchingFile(@"themes\nomatchingfiles", "foo.cs");

            // Assert
            Assert.Null(bar);
            Assert.Equal(@"themes/nomatchingfiles/foo.cs", foo);
        }
        public void DirectoryWithNoFilesReturnsNull()
        {
            // Arrange
            var themesImpl = new ThemesImplementation(scopeStorage: new ScopeStorageDictionary(),
                                                      vpp: GetVirtualPathProvider("themes", new Dir("default"), new Dir("empty-dir")));

            // Act
            var actual = themesImpl.FindMatchingFile(@"themes\empty-dir", "main.css");

            // Assert
            Assert.Null(actual);
        }
        public void FileWithSlash_ReturnsNull()
        {
            // Arrange
            var themesImpl = new ThemesImplementation(scopeStorage: new ScopeStorageDictionary(),
                                                      vpp: GetVirtualPathProvider("themes", new Dir("default"), new Dir("root"), new Dir(@"root\foo", "wp7.css"), new Dir(@"default\styles", "main.css")));

            // Act
            var actual = themesImpl.FindMatchingFile("root", "foo/bar.cs");

            // Assert
            Assert.Null(actual);
        }
Ejemplo n.º 4
0
        public void MatchingFiles_ReturnsCorrectFile()
        {
            // Arrange
            var themesImpl = new ThemesImplementation(scopeStorage: new ScopeStorageDictionary(),
                                                      vpp: GetVirtualPathProvider("themes", new Dir(@"nomatchingfiles", "foo.cs")));

            // Act
            var bar = themesImpl.FindMatchingFile(@"themes\nomatchingfiles", "bar.cs");
            var foo = themesImpl.FindMatchingFile(@"themes\nomatchingfiles", "foo.cs");

            // Assert
            Assert.Null(bar);
            Assert.Equal(@"themes/nomatchingfiles/foo.cs", foo);
        }
Ejemplo n.º 5
0
        public void DirectoryWithNoFilesReturnsNull()
        {
            // Arrange
            var themesImpl = new ThemesImplementation(scopeStorage: new ScopeStorageDictionary(),
                                                      vpp: GetVirtualPathProvider("themes", new Dir("default"), new Dir("empty-dir")));

            // Act
            var actual = themesImpl.FindMatchingFile(@"themes\empty-dir", "main.css");

            // Assert
            Assert.Null(actual);
        }
Ejemplo n.º 6
0
        public void FileWithSlash_ReturnsNull()
        {
            // Arrange
            var themesImpl = new ThemesImplementation(scopeStorage: new ScopeStorageDictionary(),
                                                      vpp: GetVirtualPathProvider("themes", new Dir("default"), new Dir("root"), new Dir(@"root\foo", "wp7.css"), new Dir(@"default\styles", "main.css")));

            // Act
            var actual = themesImpl.FindMatchingFile("root", "foo/bar.cs");

            // Assert
            Assert.Null(actual);
        }