public void ReadXElement_Empty_ThrowsSyncDocumentException()
        {
            var destinationDescriptor = new DestinationDescriptor();

            XElement element = XElement.Parse("<NotDestination />");
            destinationDescriptor.ReadXElement(element);
        }
        public void ReadXElement_TwoChildElements_CreatesTwoFields()
        {
            var destinationDescriptor = new DestinationDescriptor();
            XElement element = XElement.Parse(
                string.Format(
                    @"
<Destination templateId=""2"">
			<TemplateField name=""Field1"" id=""1"" isKey=""true"" type=""System.String"" guid=""{0}""/>
			<TemplateField name=""Field2"" id=""2"" type=""System.Int32"" guid=""{0}""/>			
</Destination>
",
                    Guid.NewGuid()));
            destinationDescriptor.ReadXElement(element);
            Assert.IsTrue(destinationDescriptor.Fields.Count() == 2);
        }
 public void ReadXElement_Empty_ThrowsArgumentNullException()
 {
     var destinationDescriptor = new DestinationDescriptor();
     XElement element = null;
     destinationDescriptor.ReadXElement(element);
 }