public void NullNullableStructure() { var expected = new NullableStructureSubject { Member = null }; var actual = new SerializationSupport().Assert(expected, @"<?xml version=""1.0"" encoding=""utf-8""?><ExtendedXmlSerializerTests-NullableStructureSubject xmlns=""clr-namespace:ExtendedXmlSerializer.Tests.ExtensionModel.Xml;assembly=ExtendedXmlSerializer.Tests"" />"); actual.Member.Should().BeNull(); }
public void NullableStructure() { var expected = new NullableStructureSubject { Member = new Structure { Message = "Hello World!" } }; var actual = new SerializationSupport().Assert(expected, @"<?xml version=""1.0"" encoding=""utf-8""?><ExtendedXmlSerializerTests-NullableStructureSubject xmlns=""clr-namespace:ExtendedXmlSerializer.Tests.ExtensionModel.Xml;assembly=ExtendedXmlSerializer.Tests""><Member><Message>Hello World!</Message></Member></ExtendedXmlSerializerTests-NullableStructureSubject>"); Assert.Equal(expected.Member.Value.Message, actual.Member.Value.Message); }