public void GetNodeInfo_ByElementTest() { string strFilePath = Environment.CurrentDirectory + "\\HostTypeInfo.xml"; string strParertName = "HostTypeInfo"; string strNodeName = "HostType"; XmlNodeList x = XmlUse.GetNodeListInfo(strFilePath, strParertName, strNodeName); Assert.AreEqual(x.Count, 2); }
public void GetObjectInfoTest1() { string strFilePath = Environment.CurrentDirectory + "\\VideoTypeInfoSource.xml"; string strParertName = "VideoTypeInfoSource"; string strNodeName = "VideoTypeInfo"; XmlNodeList x = XmlUse.GetNodeListInfo(strFilePath, strParertName, strNodeName); XmlNode node = x[0]; VideoTypeInfo result = XmlUse.GetObjectInfo <VideoTypeInfo>(node); Assert.AreEqual(result.VideoTypeName, "1"); }
public void GetObjectListInfoTest() { string strFilePath = Environment.CurrentDirectory + "\\HostTypeInfo.xml"; string strParertName = "HostTypeInfo"; string strNodeName = "HostType"; XmlNodeList x = XmlUse.GetNodeListInfo(strFilePath, strParertName, strNodeName); List <HostType> result = XmlUse.GetObjectListInfo <HostType>(x); Assert.AreEqual(result.Count, 1); }
public void GetObjectInfoTest() { string strFilePath = Environment.CurrentDirectory + "\\EntranceTypeInfo.xml"; string strParertName = "EntranceTypeInfo"; string strNodeName = "EntranceType"; XmlNodeList x = XmlUse.GetNodeListInfo(strFilePath, strParertName, strNodeName); XmlNode node = x[0]; EntranceType result = XmlUse.GetObjectInfo <EntranceType>(node); Assert.AreEqual(result.Key1, "1"); }