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

📄 fixture.cs

📁 NHibernate NET开发者所需的
💻 CS
字号:
using System;
using System.Collections;
using NHibernate.Proxy;
using NUnit.Framework;
using NUnit.Framework.SyntaxHelpers;

namespace NHibernate.Test.NHSpecificTest.NH1464
{
	[TestFixture]
	public class Fixture
	{
		public class CPPMimicBase
		{
			public virtual void Dispose()
			{
				
			}
		}
		public class CPPMimic : CPPMimicBase
		{
			public sealed override void Dispose()
			{

			}
		}

		public class Another: IDisposable
		{
			protected void Dispose(bool disposing)
			{

			}

			public void Dispose()
			{
			}

			~Another()
			{
				
			}
		}

		public class OneMore : IDisposable
		{
			public void Dispose(bool disposing)
			{

			}

			public void Dispose()
			{
			}

			~OneMore()
			{

			}
		}

		[Test]
		public void NoExceptionForDispose()
		{
			ICollection errs = ProxyTypeValidator.ValidateType(typeof (CPPMimic));
			Assert.That(errs, Is.Null);
			errs = ProxyTypeValidator.ValidateType(typeof(Another));
			Assert.That(errs, Is.Null);
			errs = ProxyTypeValidator.ValidateType(typeof(OneMore));
			Assert.That(errs.Count, Is.EqualTo(1));
		}
	}
}

⌨️ 快捷键说明

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