fixture.cs

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

CS
31
字号
using System;
using NHibernate.Cfg;
using NUnit.Framework;

namespace NHibernate.Test.NHSpecificTest.NH712
{
	//<summary>Improve returned error message when default constructor is not present on a class mapped as a component</summary> 
	//<type id="4">Improvement</type> 
	//<priority id="4">Minor</priority> 
	//<created>Fri, 15 Sep 2006 07:31:13 -0400 (EDT)</created> 
	//<version>1.2.0.Alpha1</version> 
	//<component>Core</component> 
  //<link>http://jira.nhibernate.org/browse/NH-712</link> 
	[TestFixture]
	public class Fixture
	{
		[Test, ExpectedException(typeof(InstantiationException))]
		public void Bug()
		{
			if (!Cfg.Environment.UseReflectionOptimizer)
			{
				Assert.Ignore("Test only works with reflection optimization enabled");
			}
			else
				new Configuration()
					.AddResource(GetType().Namespace + ".Mappings.hbm.xml", GetType().Assembly)
					.BuildSessionFactory();
		}
	}
}

⌨️ 快捷键说明

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