public void ReplaceFromTest([PexAssumeUnderTest] XmpTag target, XmpTag tag, string ns, string name, string value) { PexAssume.IsNotNull(tag); PexAssume.IsNotNull(ns); PexAssume.IsNotNull(name); PexAssume.IsNotNull(value); tag.SetTextNode(ns, name, value); target.ReplaceFrom(tag); PexAssert.AreEqual(value, target.GetTextNode(ns, name)); // TODO: add assertions to method XmpTagTest.ReplaceFromTest(XmpTag, XmpTag) }
/// <summary> /// Update the value of the specified node, or create it. /// Seems SetTextNode should work whether or not is already exists, but in some cases it doesn't. /// </summary> /// <param name="tag"></param> /// <param name="ns"></param> /// <param name="name"></param> /// <param name="val"></param> void AddOrModify(XmpTag tag, string ns, string name, string val) { var node = tag.FindNode(ns, name); if (node != null) { node.Value = val; } else { tag.SetTextNode(ns, name, val); } }
public void SetTextNodeTest( [PexAssumeUnderTest] XmpTag target, string ns, string name, string value ) { PexAssume.IsNotNull(ns); PexAssume.IsNotNull(name); target.SetTextNode(ns, name, value); PexAssert.AreEqual(target.GetTextNode(ns, name), value); // TODO: add assertions to method XmpTagTest.SetTextNodeTest(XmpTag, String, String, String) }
public uint?GetUIntNodeTest( [PexAssumeUnderTest] XmpTag target, string ns, string name, uint value ) { PexAssume.IsNotNull(ns); PexAssume.IsNotNull(name); PexAssume.IsNotNull(value); target.SetTextNode(ns, name, value.ToString()); uint?result = target.GetUIntNode(ns, name); PexAssert.AreEqual(result, value); return(result); // TODO: add assertions to method XmpTagTest.GetUIntNodeTest(XmpTag, String, String) }