Ejemplo n.º 1
0
        public void Get_cache_dep_should_return_null_for_builders()
        {
            //arrange
            var provider = new AssemblyResourceProvider();

            //act
            var result = provider.GetCacheDependency("~/Views/InputBuilders/foo.aspx", new string[0], DateTime.Now);

            //assert
            Assert.IsNull(result);
        }
        public void GetCacheDependency_ShouldNeverExpire()
        {
            // Arrange
            var          provider    = new AssemblyResourceProvider();
            const string virtualPath = "~/EPiServer/Geta.Epi.FontThumbnail/ClientResources/fa5/css/all.min.css";

            // Act
            var result = provider.GetCacheDependency(virtualPath, new string[0], DateTime.Now);

            // Assert
            Assert.IsType <NeverExpiresCacheCacheDependency>(result);
            Assert.False(result.HasChanged);
            Assert.Equal(new DateTime(), result.UtcLastModified);
        }