Namespace: DeltaEngine.Content.Xml
Assembly: DeltaEngine.Content.Xml (in DeltaEngine.Content.Xml.dll) Version: 1.1.1.0 (1.1.1)
Tests: DeltaEngine.Content.Xml.Tests.XmlDataTests
8 unit tests call DeltaEngine.Content.Xml.XmlData.Value
Assembly: DeltaEngine.Content.Xml (in DeltaEngine.Content.Xml.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Property Value
Type: StringRemarks
Examples
[Test] public void AddChildViaNameAndValueWillOnlyAddTheValueIfNotNull() { var node = new XmlData("Root"); Assert.IsNull(node.AddChild("Child").Value); Assert.IsNull(node.AddChild("Child", null).Value); Assert.IsEmpty(node.AddChild("Child", "").Value); Assert.AreEqual(4.ToString(), node.AddChild("Child", 4).Value); }
[Test] public void Value() { var root = new XmlData("root") { Value = "value" }; Assert.AreEqual("value", root.Value); }
[Test] public void GetDescendantValue() { XmlData root = CreateDeepTestXmlData(); Assert.AreEqual("Value5", root.GetDescendantValue("Attr5")); Assert.AreEqual("", root.GetDescendantValue("Attr6")); }
See Also