public void PiecePart2XML() { PartExtension e = p2.GetExtension("XML"); XmlPartExtension xe = e as XmlPartExtension; XmlElement xml = xe.XmlElement; Assert.AreEqual("PiecePart", xml.Name); Assert.AreEqual("7734", ChildText(xml, "PartNumber")); Assert.AreEqual("Hell", ChildText(xml, "Description")); Assert.AreEqual(666, double.Parse(ChildText(xml, "Cost")), .01); }
public void PiecePart1XML() { PartExtension e = p1.GetExtension("XML"); XmlPartExtension xe = e as XmlPartExtension; XmlElement xml = xe.XmlElement; Assert.AreEqual("PiecePart", xml.Name); Assert.AreEqual("997624", ChildText(xml, "PartNumber")); Assert.AreEqual("MyPart", ChildText(xml, "Description")); Assert.AreEqual(3.2, double.Parse(ChildText(xml, "Cost")), .01); }