fixture.cs
来自「NHibernate NET开发者所需的」· CS 代码 · 共 46 行
CS
46 行
using NUnit.Framework;
namespace NHibernate.Test.NHSpecificTest.NH776
{
[TestFixture]
public class Fixture : BugTestCase
{
public override string BugNumber
{
get { return "NH776"; }
}
[Test]
public void ProxiedOneToOneTest()
{
//Instantiate and setup associations (all needed to generate the error);
A a = new A(1, "aaa");
try
{
using (ISession session = sessions.OpenSession())
{
session.Save(a);
session.Flush();
}
using (ISession session = sessions.OpenSession())
{
A loadedA = (A) session.Load(typeof(A), 1);
Assert.IsNull(loadedA.NotProxied);
Assert.IsNull(loadedA.Proxied,
"one-to-one to proxied types not handling missing associated classes correctly (as null)");
}
}
finally
{
using (ISession session = OpenSession())
{
session.Delete(a);
session.Flush();
}
}
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?