Exemplo n.º 1
0
        public void GetOutputWebPath_NoHash()
        {
            var renderToPath = Guid.NewGuid().ToString();

            var strategy = new DefaultCacheInvalidationStrategy();

            Assert.AreEqual(renderToPath, strategy.GetOutputWebPath(renderToPath, null, null));
        }
Exemplo n.º 2
0
        public void GetOutputWebPath_HashInFilename()
        {
            var renderToPath = Guid.NewGuid().ToString() + "_#";
            var hash         = Guid.NewGuid().ToString();

            var strategy = new DefaultCacheInvalidationStrategy();

            Assert.AreEqual(renderToPath.Replace("#", hash), strategy.GetOutputWebPath(renderToPath, null, hash));
        }
Exemplo n.º 3
0
        public void GetOutputWebPath_Querystring()
        {
            var renderToPath = Guid.NewGuid().ToString() + "?something=somethingelse";
            var hashKeyName  = Guid.NewGuid().ToString();
            var hash         = Guid.NewGuid().ToString();

            var strategy = new DefaultCacheInvalidationStrategy();

            Assert.AreEqual(renderToPath + "&" + hashKeyName + "=" + hash, strategy.GetOutputWebPath(renderToPath, hashKeyName, hash));
        }