ppmcomponenttest.cs

来自「工作流的基本资料(文档资料」· CS 代码 · 共 49 行

CS
49
字号
using System;
using NetBpm.Ext.NAnt.EComp;
using NetBpm.Test;
using NetBpm.Util.Client;
using NUnit.Framework;
using Castle.Windsor.Configuration.Interpreters;

namespace NetBpm.Ext.Test.PPM
{
	[TestFixture]
	public class PPMComponentTest
	{
		private ServiceLocator serviceLocator;
		private NetBpm.NetBpmContainer container = null;

		[SetUp]
		public void SetUp()
		{
			//configure the container
			container = new NetBpm.NetBpmContainer(new XmlInterpreter(TestHelper.GetConfigDir()+"ppm_app_config.xml"));
			serviceLocator = ServiceLocator.Instance;
		}

		[TearDown]
		public void TearDown()
		{
			container.Dispose();
			container = null;
			serviceLocator = null;
		}

		[Test]
		public void TestExport()
		{
			IPPMSessionLocal ppmComponent = null;
			try
			{
				ppmComponent=(IPPMSessionLocal)container["PPMSession"];
				ppmComponent.ExportPPMFile(TestHelper.GetConfigDir()+"/..");
			}
			finally
			{
				container.Release(ppmComponent);				
			}
			
		}
	}
}

⌨️ 快捷键说明

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