Exemplo n.º 1
0
        public void HandlesAutoProperties()
        {
            var objectWithAnAutoProperty = new ClassWithAnAutoProperty {
                AutoProperty = 10
            };

            SerialiseAndDeserialise(objectWithAnAutoProperty);
        }
        public void HandlesAutoProperties()
        {
            var objectWithAnAutoProperty = new ClassWithAnAutoProperty {AutoProperty = 10};
            const string serializedXml = @"<ClassWithAnAutoProperty class=" +
                                        "\"Xstream.Tests.Accepatance.AutoPropertiesTest+ClassWithAnAutoProperty, XStream.Tests, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null\">" +
                                        "<AutoProperty>10</AutoProperty></ClassWithAnAutoProperty>";

            AssertXmlEquals(serializedXml, xstream.ToXml(objectWithAnAutoProperty));
            Assert.AreEqual(objectWithAnAutoProperty, xstream.FromXml(serializedXml));
        }
 private bool Equals(ClassWithAnAutoProperty other)
 {
     return other.AutoProperty == AutoProperty;
 }
Exemplo n.º 4
0
 public void HandlesAutoProperties() {
     var objectWithAnAutoProperty = new ClassWithAnAutoProperty {AutoProperty = 10};
     SerialiseAndDeserialise(objectWithAnAutoProperty);
 }
Exemplo n.º 5
0
 private bool Equals(ClassWithAnAutoProperty other)
 {
     return(other.AutoProperty == AutoProperty);
 }