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

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

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

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

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

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

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

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

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

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

            // Assert
            Assert.False(result);
        }