Exemplo n.º 1
0
        public void UsingTransformationEarlyInsert()
        {
            string mySample = @"<BasicTypesSampleWithoutAttr>
                    <AString>whatever</AString>
                  </BasicTypesSampleWithoutAttr>"; ;

            var src = new XmlConfigSource<BasicTypesSampleWithoutAttr>();
            src.AddTransform(x => x.AString = "42");
            src.Get().Should().Be.Null();

            src.Load(mySample);
            src.Get().Should().Not.Be.Null();
            src.Get().AString.Should().Be("42");
        }