Exemple #1
0
 public TestKeyword(XmlNode node, SUITE_TYPE suiteType)
 {
     m_Type = (TESTKEYWORD_TYPE)Enum.Parse(typeof(TESTKEYWORD_TYPE), node.Attributes.GetNamedItem("type").Value);
     m_Name = node.Attributes.GetNamedItem("name").Value;
     m_NameIndex = int.Parse(node.Attributes.GetNamedItem("nameindex").Value);
     if( suiteType == SUITE_TYPE.WITH_TEST )
         m_SuiteIndex = int.Parse(node.Attributes.GetNamedItem("suiteindex").Value);
     else
         m_SuiteIndex = -1;
 }
Exemple #2
0
        public TestRule(XmlNode node)
        {
            m_Name = node.Attributes.GetNamedItem("name").Value;
            m_SuiteType = (SUITE_TYPE)Enum.Parse( typeof(SUITE_TYPE), node.Attributes.GetNamedItem("suitetype").Value );
            m_BindType = (BIND_TYPE)Enum.Parse( typeof(BIND_TYPE), node.Attributes.GetNamedItem("bindtype").Value );

            XmlNodeList keywordList = node.SelectNodes("KeywordList/Keyword");
            foreach (XmlNode keywordNode in keywordList)
            {
                TestKeyword keyword = new TestKeyword(keywordNode, m_SuiteType);
                m_Keywords.Add(keyword.Name, keyword);
            }
        }