⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xmltest.cs

📁 工作流的基本资料(文档资料
💻 CS
字号:
using System.Collections;
using System.Xml;
using NetBpm.Util.Xml;
using NUnit.Framework;
using XmlElement = NetBpm.Util.Xml.XmlElement;

namespace NetBpm.Test.Util
{
	[TestFixture]
	public class XMLTest
	{
		public XMLTest()
		{
		}

		[Test]
		public void TestXmlParser()
		{
			XmlTextReader exampleXml = new XmlTextReader(
				TestHelper.GetExampleDir()+"process\\holiday\\processdefinition.xml");
			XmlParser xmlParser = new XmlParser(exampleXml);
			XmlElement element = xmlParser.Parse();

			XmlElement startstate = element.GetChildElement("start-state");
			Assert.IsNotNull(startstate);
			Assert.IsNotNull(startstate.GetAttribute("name"));

			XmlElement endstate = element.GetChildElement("end-state");
			Assert.IsNotNull(endstate);
			Assert.IsNotNull(endstate.GetAttribute("name"));

			IList pdattr = element.GetChildElements("attribute");
			Assert.IsNotNull(pdattr);
			Assert.IsTrue(pdattr.Count > 1);
		}

	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -