Esempio n. 1
0
        public void IsValidRazorFileInfoCollection_ReturnsTrue_IfTypeDerivesFromRazorFileInfoCollection(Type type)
        {
            // Act
            var result = PrecompiledViewsCompilerCacheProvider.IsValidRazorFileInfoCollection(type);

            // Assert
            Assert.True(result);
        }
Esempio n. 2
0
        public void IsValidRazorFileInfoCollection_ReturnsFalse_IfTypeHasGenericParameters()
        {
            // Arrange
            var type = typeof(GenericRazorFileInfoCollection <>);

            // Act
            var result = PrecompiledViewsCompilerCacheProvider.IsValidRazorFileInfoCollection(type);

            // Assert
            Assert.False(result);
        }
Esempio n. 3
0
        public void IsValidRazorFileInfoCollection_ReturnsFalse_IfTypeDoesNotDeriveFromRazorFileInfoCollection()
        {
            // Arrange
            var type = typeof(NonSubTypeRazorFileInfoCollection);

            // Act
            var result = PrecompiledViewsCompilerCacheProvider.IsValidRazorFileInfoCollection(type);

            // Assert
            Assert.False(result);
        }
Esempio n. 4
0
        public void IsValidRazorFileInfoCollection_ReturnsFalse_IfTypeIsAbstract()
        {
            // Arrange
            var type = typeof(AbstractRazorFileInfoCollection);

            // Act
            var result = PrecompiledViewsCompilerCacheProvider.IsValidRazorFileInfoCollection(type);

            // Assert
            Assert.False(result);
        }