Ejemplo n.º 1
0
        public void GetLayout_WithXmlLayoutSchemaLog4jAttribute_ShouldReturnLayout2RawLayout()
        {
            // Arrange
            var sut       = new LayoutAdapterProvider();
            var attribute = new XmlLayoutSchemaLog4jAttribute();

            // Act
            var result = sut.GetLayout(attribute);

            // Assert
            Assert.IsInstanceOfType(result, typeof(Layout2RawLayoutAdapter));
        }
Ejemplo n.º 2
0
        public void GetLayout_WithPatternLayoutAttribute_ShouldReturnLayout2RawLayout()
        {
            // Arrange
            var sut       = new LayoutAdapterProvider();
            var attribute = new PatternLayoutAttribute("%message");

            // Act
            var result = sut.GetLayout(attribute);

            // Assert
            Assert.IsInstanceOfType(result, typeof(Layout2RawLayoutAdapter));
        }
Ejemplo n.º 3
0
        public void GetLayout_WithRawPropertyLayoutAttribute_ShouldReturnRawPropertyLayout()
        {
            // Arrange
            var sut       = new LayoutAdapterProvider();
            var attribute = new RawPropertyLayoutAttribute("log4net:HostName");

            // Act
            var result = sut.GetLayout(attribute);

            // Assert
            Assert.IsInstanceOfType(result, typeof(RawPropertyLayout));
        }
Ejemplo n.º 4
0
        public void GetLayout_WithNullAttribute_ShouldReturnNull()
        {
            // Arrange
            var             sut       = new LayoutAdapterProvider();
            LayoutAttribute attribute = null;

            // Act
            var result = sut.GetLayout(attribute);

            // Assert
            Assert.IsNull(result);
        }
Ejemplo n.º 5
0
        public void GetLayout_WithRawUtcTimeStampLayoutAttribute_ShouldReturnRawUtcTimeStampLayout()
        {
            // Arrange
            var sut       = new LayoutAdapterProvider();
            var attribute = new RawUtcTimeStampLayoutAttribute();

            // Act
            var result = sut.GetLayout(attribute);

            // Assert
            Assert.IsInstanceOfType(result, typeof(RawUtcTimeStampLayout));
        }