public void AddNodeInfoTest() { string strFilePath = Environment.CurrentDirectory + "\\LayoutSetting.xml"; string strParertName = "LayoutSetting"; string strNodeName = "SetingInfo"; string[] strsField = new string[] { "key", "value", "defaultvalue", "describe", "tag", "ramark", "remark1", "remark2", "remark3" }; string[] strsValue = new string[] { "key", "value", "defaultvalue", "describe", "tag", "ramark", "remark1", "remark2", "remark3" }; bool bolResult = XmlUse.AddNodeInfo(strFilePath, strParertName, strNodeName, strsField, strsValue); Assert.IsTrue(bolResult); }
public void AddNodeInfoTest2() { string strFilePath = Environment.CurrentDirectory + "\\EntranceTypeInfo.xml"; string strParertName = "EntranceTypeInfo"; string strNodeName = "EntranceType"; EntranceType e = new EntranceType { Key = "11", Key2 = "12" }; bool bolResult = XmlUse.AddNodeInfo(e, strFilePath, strParertName); Assert.IsTrue(bolResult); }
public void AddNodeInfoTest1() { bool bolResult = false; string strFilePath = Environment.CurrentDirectory + "\\EntranceTypeInfo.xml"; string strParertName = "EntranceTypeInfo"; XmlUse.CreateXmlFile(strFilePath, strParertName); string strNodeName; string[] strsField; string[] strsValue; strNodeName = "EntranceType"; strsField = new string[] { "Key", "Key1", "Name", "ProgValue", "Describe" }; strsValue = new string[] { "21", "21E0", "联动门外门", "DoubleDoorFinger", "" }; XmlUse.AddNodeInfo(strFilePath, strParertName, strNodeName, strsField, strsValue); strNodeName = "EntranceType"; strsField = new string[] { "Key", "Key1", "Name", "ProgValue", "Describe" }; strsValue = new string[] { "25", "21E1", "联动门内门", "DoubleInDoorFinger", "" }; XmlUse.AddNodeInfo(strFilePath, strParertName, strNodeName, strsField, strsValue); strNodeName = "EntranceType"; strsField = new string[] { "Key", "Key1", "Name", "ProgValue", "Describe" }; strsValue = new string[] { "22", "22E1", "业务库金库门", "MoneyRoomFinger", "" }; XmlUse.AddNodeInfo(strFilePath, strParertName, strNodeName, strsField, strsValue); strNodeName = "EntranceType"; strsField = new string[] { "Key", "Key1", "Name", "ProgValue", "Describe" }; strsValue = new string[] { "24", "22E0", "业务库隔离门", "SplitDoorFinger", "" }; XmlUse.AddNodeInfo(strFilePath, strParertName, strNodeName, strsField, strsValue); strNodeName = "EntranceType"; strsField = new string[] { "Key", "Key1", "Name", "Progvalue", "Describe" }; strsValue = new string[] { "23", "23E0", "加钞间", "AddMoneyFinger", "" }; XmlUse.AddNodeInfo(strFilePath, strParertName, strNodeName, strsField, strsValue); Assert.IsTrue(bolResult); }