Beispiel #1
0
        public void WitsmlParser_ToXml_Returns_Xml_From_Object()
        {
            var inWellObject  = WitsmlParser.Parse <WellList>(WitsmlParser.Parse(_wellXml).Root);
            var result        = WitsmlParser.ToXml(inWellObject);
            var outWellObject = WitsmlParser.Parse <WellList>(WitsmlParser.Parse(result).Root);

            Assert.AreEqual(inWellObject.Well.Count, outWellObject.Well.Count);
            Assert.AreEqual(inWellObject.Well[0].Name, outWellObject.Well[0].Name);
            Assert.AreEqual(inWellObject.Well[0].PercentInterest.Uom, outWellObject.Well[0].PercentInterest.Uom);
            Assert.AreEqual(inWellObject.Well[0].PercentInterest.Value, outWellObject.Well[0].PercentInterest.Value);
        }
Beispiel #2
0
 public void WitsmlParser_ToXml_Returns_Empty_String_For_Null_Object()
 {
     Assert.AreEqual(string.Empty, WitsmlParser.ToXml(null));
 }