fixture.cs

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

CS
39
字号
using System;
using System.Collections;
using NHibernate.Cfg;
using NUnit.Framework;

namespace NHibernate.Test.NHSpecificTest.NH606
{
	public class HasNonGenericList
	{
		private int id;
		private IList nonGenericList;

		public virtual int Id
		{
			get { return id; }
			set { id = value; }
		}

		public virtual IList NonGenericList
		{
			get { return nonGenericList; }
			set { nonGenericList = value; }
		}
	}

	[TestFixture]
	public class Fixture
	{
		[Test, ExpectedException(typeof(MappingException))]
		public void InvalidGenericMapping()
		{
			ISessionFactory sf = new Configuration()
				.AddResource(typeof (Fixture).Namespace + ".Mapping.hbm.xml", typeof (Fixture).Assembly)
				.BuildSessionFactory();
			sf.Close();
		}
	}
}

⌨️ 快捷键说明

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