📄 fixture.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 + -