Exemple #1
0
        public void Match_ReturnsTrue_IfTypeDerivesFromRazorFileInfoCollection()
        {
            // Arrange
            var type = typeof(ViewCollection);

            // Act
            var result = CompilerCache.Match(type);

            // Assert
            Assert.True(result);
        }
Exemple #2
0
        public void Match_ReturnsFalse_IfTypeDoesNotDeriveFromRazorFileInfoCollection()
        {
            // Arrange
            var type = typeof(NonSubTypeRazorFileInfoCollection);

            // Act
            var result = CompilerCache.Match(type);

            // Assert
            Assert.False(result);
        }
Exemple #3
0
        public void Match_ReturnsFalse_IfTypeHasGenericParameters()
        {
            // Arrange
            var type = typeof(GenericRazorFileInfoCollection <>);

            // Act
            var result = CompilerCache.Match(type);

            // Assert
            Assert.False(result);
        }
Exemple #4
0
        public void Match_ReturnsFalse_IfTypeDoesNotHaveDefaultConstructor()
        {
            // Arrange
            var type = typeof(ParameterConstructorRazorFileInfoCollection);

            // Act
            var result = CompilerCache.Match(type);

            // Assert
            Assert.False(result);
        }
Exemple #5
0
        public void Match_ReturnsFalse_IfTypeIsAbstract()
        {
            // Arrange
            var type = typeof(AbstractRazorFileInfoCollection);

            // Act
            var result = CompilerCache.Match(type);

            // Assert
            Assert.False(result);
        }