public void CreateAssetUrlWherePathHasNoExtensionReturnsUrlWithTheAssetPath()
        {
            asset.SetupGet(a => a.Path).Returns("~/test/asset");

            var url = UrlGenerator.CreateAssetUrl(asset.Object);

            url.ShouldEqual("cassette.axd/asset/test/asset?" + expectedHash);
        }
        public void CreateAssetUrlWherePathHasPeriodsInDirectoryNamesReturnsUrlWithTheAssetPath()
        {
            asset.SetupGet(a => a.Path).Returns("~/test.test/asset.coffee");

            var url = UrlGenerator.CreateAssetUrl(asset.Object);

            url.ShouldEqual("cassette.axd/asset/test.test/asset.coffee?" + expectedHash);
        }
        public void UrlModifierModifyIsCalled()
        {
            asset.SetupGet(a => a.Path).Returns("~/test/asset.coffee");

            UrlGenerator.CreateAssetUrl(asset.Object);

            UrlModifier.Verify(m => m.Modify(It.IsAny <string>()));
        }
Exemplo n.º 4
0
        public void UrlModifierModifyIsCalled()
        {
            var asset = new Mock <IAsset>();

            asset.SetupGet(a => a.SourceFile.FullPath).Returns("~/test/asset.coffee");
            asset.SetupGet(a => a.Hash).Returns(new byte[0]);

            UrlGenerator.CreateAssetUrl(asset.Object);

            UrlModifier.Verify(m => m.Modify(It.IsAny <string>()));
        }
Exemplo n.º 5
0
        public void CreateAssetUrlReturnsCompileUrl()
        {
            var asset = new Mock <IAsset>();

            asset.SetupGet(a => a.SourceFile.FullPath).Returns("~/test/asset.coffee");
            asset.SetupGet(a => a.Hash).Returns(new byte[] { 1, 2, 15, 16 });

            var url = UrlGenerator.CreateAssetUrl(asset.Object);

            url.ShouldEqual("_cassette/asset/test/asset.coffee?01020f10");
        }