nh952fixture.cs

来自「NHibernate NET开发者所需的」· CS 代码 · 共 37 行

CS
37
字号
using System.Collections.Generic;
using System.Reflection;

using NHibernate.Cfg;

using NUnit.Framework;

namespace NHibernate.Test.NHSpecificTest.NH952
{
	[TestFixture]
	public class NH952Fixture
	{
		private static readonly Assembly MyAssembly = typeof(NH952Fixture).Assembly;
		private static readonly string MyNamespace = typeof(NH952Fixture).Namespace;
		
		private static readonly string[] Resources = new string[]
			{
				// Order is important!
				MyNamespace + ".Asset.hbm.xml",
				MyNamespace + ".SellableItem.hbm.xml",
				MyNamespace + ".PhysicalItem.hbm.xml",
				MyNamespace + ".Item.hbm.xml"
			};

		[Test]
		public void OrderingAddResources()
		{
			Configuration cfg = new Configuration();
			foreach (string res in Resources)
			{
				cfg.AddResource(res, MyAssembly);
			}
			cfg.BuildSessionFactory().Close();
		}
	}
}

⌨️ 快捷键说明

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