public void GetPropertyByName_NameHasDot() { PtfConfig ptfConfig = new PtfConfig( new List <string>() { @"Resources\MS-DRSR.ptfconfig" }, new List <string>() { @"Resources\MS-DRSR1.ptfconfig" } ); var propertyNode1 = ptfConfig.GetPropertyNodeByName("GroupName1.SubGroup1.Property1"); Assert.IsNotNull(propertyNode1, "The property node should exist."); Assert.AreEqual("value1", propertyNode1.Value, "Verify the property value."); var propertyNode2 = ptfConfig.GetPropertyNodeByName("GroupName1.SubGroup2.Property2"); Assert.IsNotNull(propertyNode2, "The property node should exist."); Assert.AreEqual("value2", propertyNode2.Value, "Verify the property value."); var propertyNode3 = ptfConfig.GetPropertyNodeByName("GroupName1.Property3"); Assert.IsNotNull(propertyNode3, "The property node should exist."); Assert.AreEqual("value3", propertyNode3.Value, "Verify the property value."); }
public void GetPropertyByName() { PtfConfig ptfConfig = new PtfConfig( new List <string>() { @"Resources\PtfConfig_Config1.ptfconfig", @"Resources\PtfConfig_Config2.ptfconfig" }, new List <string>() { @"Resources\PtfConfig_Config1_default.ptfconfig", @"Resources\PtfConfig_Config2_default.ptfconfig" } ); PtfProperty p0 = ptfConfig.GetPropertyNodeByName("Group02.Property03"); Assert.AreEqual("value03", p0.Value, "Verify property value of Group02.Property03."); PtfProperty p1 = ptfConfig.GetPropertyNodeByName("Property01"); Assert.AreEqual("value01-2", p1.Value, "Verify property value of Property01."); }
public void ReadOldStylePtfConfig() { PtfConfig ptfConfig = new PtfConfig( new List <string>() { @"Resources\MS-DRSR.ptfconfig" }, new List <string>() { @"Resources\MS-DRSR1.ptfconfig" } ); var propertyNode = ptfConfig.GetPropertyNodeByName("Common.DomainFunctionLevel"); Assert.IsNotNull(propertyNode, "The property node should exist."); Assert.AreEqual("DS_BEHAVIOR_WIN2012R2", propertyNode.Value, "Verify the property value."); }