nh930fixture.cs
来自「NHibernate NET开发者所需的」· CS 代码 · 共 32 行
CS
32 行
using System;
using NHibernate.Cfg;
using NHibernate.Dialect;
using NUnit.Framework;
namespace NHibernate.Test.NHSpecificTest.NH930
{
[TestFixture]
public class NH930Fixture
{
[Test]
public void DuplicateConstraints()
{
Configuration cfg = new Configuration();
cfg.AddResource(GetType().Namespace + ".Mappings.hbm.xml", GetType().Assembly);
string[] script = cfg.GenerateSchemaCreationScript(new MsSql2000Dialect());
int constraintCount = 0;
foreach (string str in script)
{
if (str.IndexOf("foreign key (DependentVariableId) references NVariable") >= 0)
{
constraintCount++;
}
}
Assert.AreEqual(1, constraintCount);
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?