public void Create_XPath() { var user = GetFullUser(); var userXml = GetUserXml(UserMixedXmlFormat, user); var source = XDocument.Parse(userXml); var map = new XPathToUserMap(); var mappedUser = map.Create(source); AssertEqual(user, mappedUser); }
public void Specify_Invalid() { var map = new XPathToUserMap(); AssertRaisesException<ArgumentException>(()=>map.Specify(XmlNodeType.CDATA, XName.Get("id", "ns"), x => x.Id), "XmlNodeType must be Element or Attribute; CDATA not supported{0}Parameter name: nodeType", Environment.NewLine); }
public void Specify_Invalid() { var map = new XPathToUserMap(); AssertRaisesException <ArgumentException>(() => map.Specify(XmlNodeType.CDATA, XName.Get("id", "ns"), x => x.Id), "XmlNodeType must be Element or Attribute; CDATA not supported{0}Parameter name: nodeType", Environment.NewLine); }