示例#1
0
        public void CreateRawFileUrlReturnsUrlWithRoutePrefixAndHashAndPathWithoutTilde()
        {
            SourceDirectory.Add("~\\test.png", "content");
            var url = UrlGenerator.CreateRawFileUrl("~/test.png");

            url.ShouldEqual("cassette.axd/file/test-040f06fd774092478d450774f5ba30c5da78acc8.png");
        }
示例#2
0
        public void InsertsHashBeforeLastPeriod()
        {
            SourceDirectory.Add("~\\test\\foo.bar.png", "content");
            var url = UrlGenerator.CreateRawFileUrl("~\\test\\foo.bar.png");

            url.ShouldEqual("cassette.axd/file/test/foo.bar-040f06fd774092478d450774f5ba30c5da78acc8.png");
        }
示例#3
0
        public void ConvertsToForwardSlashes()
        {
            SourceDirectory.Add("~\\test\\foo.png", "content");
            var url = UrlGenerator.CreateRawFileUrl("~\\test\\foo.png");

            url.ShouldEqual("cassette.axd/file/test/foo-040f06fd774092478d450774f5ba30c5da78acc8.png");
        }
示例#4
0
        public void ToleratesFilenameWithoutExtension()
        {
            SourceDirectory.Add("~\\test\\foo", "content");
            var url = UrlGenerator.CreateRawFileUrl("~\\test\\foo");

            url.ShouldEqual("cassette.axd/file/test/foo-040f06fd774092478d450774f5ba30c5da78acc8");
        }
        public void EscapesSpaces()
        {
            SourceDirectory.Add("~\\space test.png", "content");
            var url = UrlGenerator.CreateRawFileUrl("~/space test.png");

            url.ShouldEqual("cassette.axd/file/space%20test-040f06fd774092478d450774f5ba30c5da78acc8.png");
        }