Esempio n. 1
0
        public void Match_ReturnsTrue_IfTypeDerivesFromRazorFileInfoCollection()
        {
            // Arrange
            var type = typeof(ViewCollection);

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

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

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

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

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

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

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

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

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

            // Assert
            Assert.False(result);
        }