Beispiel #1
0
        public void GetLayout_WithXmlLayoutAttribute_ShouldReturnLayout2RawLayout()
        {
            // Arrange
            var sut       = new LayoutAdapterProvider();
            var attribute = new XmlLayoutAttribute();

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

            // Assert
            Assert.IsInstanceOfType(result, typeof(Layout2RawLayoutAdapter));
        }
Beispiel #2
0
        public void ConfigureLayout_WithAttribute_ShouldSetBase64EncodeProperties()
        {
            // Arrange
            var sut       = new XmlLayoutAdapter();
            var attribute = new XmlLayoutAttribute()
            {
                Base64EncodeProperties = true
            };
            var layout = new XmlLayout();

            // Act
            sut.ConfigureLayout(layout, attribute);

            // Assert
            Assert.AreEqual(attribute.Base64EncodeProperties, layout.Base64EncodeProperties);
        }
Beispiel #3
0
        public void ConfigureLayout_WithAttribute_ShouldSetLocationInfo()
        {
            // Arrange
            var sut       = new XmlLayoutAdapter();
            var attribute = new XmlLayoutAttribute()
            {
                LocationInfo = true
            };
            var layout = new XmlLayout();

            // Act
            sut.ConfigureLayout(layout, attribute);

            // Assert
            Assert.AreEqual(attribute.LocationInfo, layout.LocationInfo);
        }
Beispiel #4
0
        public void ConfigureLayout_WithAttribute_ShouldSetPrefix()
        {
            // Arrange
            var sut       = new XmlLayoutAdapter();
            var attribute = new XmlLayoutAttribute()
            {
                Prefix = "Test"
            };
            var layout = new XmlLayout();

            // Act
            sut.ConfigureLayout(layout, attribute);

            // Assert
            Assert.AreEqual(attribute.Prefix, layout.Prefix);
        }