Esempio n. 1
0
            public void AppendsPrefix()
            {
                var folder = new PublicFolder {
                    Prefix = "unit-test"
                };
                var path = folder.GetDirectoryListKey(Path.Combine(folder.FolderPath, "path1", "path2"));

                path.Equals("/unit-test/path1/path2").ShouldBeTrue();
            }
Esempio n. 2
0
            public void RemovesFolderPath()
            {
                var folder = new PublicFolder();
                var path   = Path.Combine(folder.FolderPath, "path1", "path2");

                path.StartsWith(folder.FolderPath).ShouldBeTrue();
                path.ToLower().StartsWith(folder.FolderPath.ToLower()).ShouldBeTrue();

                path = folder.GetDirectoryListKey(path);

                path.Equals("/path1/path2").ShouldBeTrue();
            }
Esempio n. 3
0
            public void ReplacesBackslashWithForwardslash()
            {
                var folder = new PublicFolder();
                var path   = Path.Combine(folder.FolderPath, "path1", "path2");

                path.Contains(@"\").ShouldBeTrue();
                path.Contains(@"/").ShouldBeFalse();

                path = folder.GetDirectoryListKey(path);

                path.Contains(@"\").ShouldBeFalse();
                path.Contains(@"/").ShouldBeTrue();
            }