public void CreateRawFileUrlReturnsUrlWithRoutePrefixAndHashAndPathWithoutTilde() { SourceDirectory.Add("~\\test.png", "content"); var url = UrlGenerator.CreateRawFileUrl("~/test.png"); url.ShouldEqual("cassette.axd/file/test-040f06fd774092478d450774f5ba30c5da78acc8.png"); }
public void ArgumentExceptionThrownWhenFilenameDoesNotStartWithTilde() { Assert.Throws <ArgumentException>(delegate { UrlGenerator.CreateRawFileUrl("fail.png", "hash"); }); }
public void ToleratesFilenameWithoutExtension() { SourceDirectory.Add("~\\test\\foo", "content"); var url = UrlGenerator.CreateRawFileUrl("~\\test\\foo"); url.ShouldEqual("cassette.axd/file/test/foo-040f06fd774092478d450774f5ba30c5da78acc8"); }
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"); }
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"); }
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"); }
public void ConvertsToForwardSlashes() { var url = UrlGenerator.CreateRawFileUrl("~\\test\\foo.png", "hash"); url.ShouldEqual("_cassette/file/test/foo_hash.png"); }
public void CreateRawFileUrlReturnsUrlWithRoutePrefixAndPathWithoutTildeAndHash() { var url = UrlGenerator.CreateRawFileUrl("~/test.png", "hash"); url.ShouldStartWith("_cassette/file/test_hash.png"); }
public void CreateRawFileUrlReturnsUrlWithRoutePrefixAndHashAndPathWithoutTilde() { var url = UrlGenerator.CreateRawFileUrl("~/test.png", "hash"); url.ShouldEqual("cassette.axd/file/test-hash.png"); }
public void InsertsHashBeforeLastPeriod() { var url = UrlGenerator.CreateRawFileUrl("~\\test\\foo.bar.png", "hash"); url.ShouldEqual("cassette.axd/file/test/foo.bar-hash.png"); }
public void ToleratesFilenameWithoutExtension() { var url = UrlGenerator.CreateRawFileUrl("~\\test\\foo", "hash"); url.ShouldEqual("cassette.axd/file/test/foo-hash"); }