Ejemplo n.º 1
0
		public void TestCreateNullRule()
		{
			WsScanRules scanRules = new WsScanRules();
			XmlDocument xmlDocument = new XmlDocument();
			XMLContentBuilder xmlContentBuilder = new XMLContentBuilder(scanRules);
			XmlElement ruleElement = xmlContentBuilder.CreateRuleNode(xmlDocument, null);
		}
Ejemplo n.º 2
0
		public void TestCreateRuleNullXmlDocument()
		{
			WsScanRules scanRules = new WsScanRules();
			XMLContentBuilder xmlContentBuilder = new XMLContentBuilder(scanRules);
			WsScanRule findSomeRule = new WsScanRule("Find some", "FindSomeIndex", "some", RuleLevels.High);
			xmlContentBuilder.CreateRuleNode(null, findSomeRule);
		}
Ejemplo n.º 3
0
		public void TestCreateRuleNode()
		{
			WsScanRules scanRules = new WsScanRules();
			WsScanRule findSomeRule = new WsScanRule("Test rule", "Find some", "some", RuleLevels.High);
			scanRules.Add(findSomeRule);

			XmlDocument xmlDocument = new XmlDocument();
			XMLContentBuilder xmlContentBuilder = new XMLContentBuilder(scanRules);
			XmlElement ruleElement = xmlContentBuilder.CreateRuleNode(xmlDocument, findSomeRule);
			Assert.IsNotNull(ruleElement);
			Assert.AreEqual("<rule name=\"Find some\" level=\"High\" />", ruleElement.OuterXml);
		}