Exemplo n.º 1
0
        public void IsRecompilationSupported_NoChecksumAttributes_ReturnsFalse()
        {
            // Arrange
            var item = new TestRazorCompiledItem(typeof(string), "mvc.1.0.view", "/Views/Home/Index.cstml", new object[] { });

            // Act
            var result = PublicChecksumValidator.IsRecompilationSupported(item);

            // Assert
            Assert.False(result);
        }
Exemplo n.º 2
0
        public void IsRecompilationSupported_NoPrimaryChecksumAttribute_ReturnsFalse()
        {
            // Arrange
            var item = new TestRazorCompiledItem(typeof(string), "mvc.1.0.view", "/Views/Home/Index.cstml", new object[]
            {
                new RazorSourceChecksumAttribute("SHA1", TestRazorCompiledItem.GetChecksum("some import"), "/Views/Home/_ViewImports.cstml"),
            });

            // Act
            var result = PublicChecksumValidator.IsRecompilationSupported(item);

            // Assert
            Assert.False(result);
        }