예제 #1
0
        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);
        }
예제 #2
0
        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");
        }
예제 #3
0
        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);
        }
예제 #4
0
        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");
        }