public void EnumTypeElementSerializesCorrectlyWhenExtraTypesArePassedIn() { var container = new EnumTypeElementContainer { Value = MyEnum.Value2 }; var serializer = new XmlSerializer <EnumTypeElementContainer>(typeof(MyEnum)); var xml = serializer.Serialize(container); Assert.That(xml, Contains.Substring("MyEnum.Value2")); }
public void EnumTypeElementSerializesCorrectlyWhenExtraTypesArePassedIn() { var container = new EnumTypeElementContainer { Value = MyEnum.Value2 }; var serializer = new XmlSerializer<EnumTypeElementContainer>(typeof(MyEnum)); var xml = serializer.Serialize(container); Assert.That(xml, Contains.Substring("MyEnum.Value2")); }