ToXml() public method

public ToXml ( ) : System.Xml.Linq.XElement
return System.Xml.Linq.XElement
 public void ToXmlExpectedReturnsXml()
 {
     var workflow = new WorkflowDescriptor();
     var result = workflow.ToXml();
     Assert.IsNotNull(result);
     Assert.IsInstanceOfType(result, typeof(XElement));
 }
        public void ToXmlExpectedSerializesIDandName()
        {
            var workflow = new WorkflowDescriptor
            {
                ResourceID = Guid.NewGuid().ToString(),
                ResourceName = "Testing123"
            };
            var result = workflow.ToXml();

            var properties = workflow.GetType().GetProperties();
            foreach(var property in properties)
            {
                if (property.Name == "IsNotifying" || property.Name == "IsSelected")
                {
                    continue;  
                }
                var expected = property.GetValue(workflow).ToString().ToLower();
                var actual = result.AttributeSafe(property.Name).ToLower();
                Assert.AreEqual(expected, actual);
            }
        }