Ejemplo n.º 1
0
        public void UriAbsoluteLowerInvariantCacheKey_Is_AbsoluteAndLowercase()
        {
            HttpContext context  = CreateHttpContext();
            var         commands = new CommandCollection()
            {
                { "Width", "400" }
            };

            const string expected = "testwebsite.com/images/image-12345.jpeg?width=400";
            string       actual   = UriAbsoluteLowerInvariantCacheKey.Create(context, commands);

            Assert.Equal(expected, actual);
        }
Ejemplo n.º 2
0
        public void LegacyV1CacheKey_Matches_V1_Behavior()
        {
            HttpContext context  = CreateHttpContext();
            var         commands = new CommandCollection()
            {
                { "Width", "400" }
            };

            const string expected = "testwebsite.com/images//image-12345.jpeg?width=400";
            string       actual   = LegacyV1CacheKey.Create(context, commands);

            Assert.Equal(expected, actual);
        }
Ejemplo n.º 3
0
        public void UriRelativeCacheKey_Is_Relative()
        {
            HttpContext context  = CreateHttpContext();
            var         commands = new CommandCollection()
            {
                { "Width", "400" }
            };

            const string expected = "/Images/Image-12345.jpeg?width=400";
            string       actual   = UriRelativeCacheKey.Create(context, commands);

            Assert.Equal(expected, actual);
        }