fixture.cs
来自「NHibernate NET开发者所需的」· CS 代码 · 共 72 行
CS
72 行
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 + =
减小字号Ctrl + -
显示快捷键?