Ejemplo n.º 1
0
        public void GetCacheRootThrows(string cacheFolder, string cacheRootPath, string webRootPath, string contentRootPath)
        {
            var cacheOptions = new PhysicalFileSystemCacheOptions
            {
                CacheFolder   = cacheFolder,
                CacheRootPath = cacheRootPath
            };

            Assert.Throws <InvalidOperationException>(() => PhysicalFileSystemCache.GetCacheRoot(cacheOptions, webRootPath, contentRootPath));
        }
Ejemplo n.º 2
0
        public void GetCacheRoot(string cacheFolder, string cacheRootPath, string webRootPath, string contentRootPath, string expected)
        {
            var cacheOptions = new PhysicalFileSystemCacheOptions
            {
                CacheFolder   = cacheFolder,
                CacheRootPath = cacheRootPath
            };

            string actual = PhysicalFileSystemCache.GetCacheRoot(cacheOptions, webRootPath, contentRootPath);

            Assert.Equal(expected, actual);
        }
Ejemplo n.º 3
0
        public void CacheRootFromOptions(string cacheFolder, string cacheRoot, string webRootPath, string contentRootPath, string expected)
        {
            var cacheOptions = new PhysicalFileSystemCacheOptions
            {
                CacheFolder = cacheFolder,
                CacheRoot   = cacheRoot
            };

            var cacheRootResult = PhysicalFileSystemCache.GetCacheRoot(cacheOptions, webRootPath, contentRootPath);

            Assert.Equal(expected, cacheRootResult);
        }