public void CreateXmlFileTest() { string strFilePath = Environment.CurrentDirectory + "\\LayoutSetting.xml"; string strRootName = "LayoutSetting"; bool bolResult = XmlUse.CreateXmlFile(strFilePath, strRootName); 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); }