本文整理汇总了C#中PropDef.HasLookupList方法的典型用法代码示例。如果您正苦于以下问题:C# PropDef.HasLookupList方法的具体用法?C# PropDef.HasLookupList怎么用?C# PropDef.HasLookupList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PropDef
的用法示例。
在下文中一共展示了PropDef.HasLookupList方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TestCreateBOProp_CorrectPropCreated
public void TestCreateBOProp_CorrectPropCreated()
{
//---------------Set up test pack-------------------
PropDef propDef = new PropDef("PropName", typeof(int), PropReadWriteRule.ReadWrite, null);
//-----Test PreCondition--------------------------
Assert.IsFalse(propDef.HasLookupList());
//---------------Execute Test ----------------------
IBOProp prop = propDef.CreateBOProp(false);
//---------------Test Result -----------------------
Assert.IsInstanceOf(typeof(BOProp), prop);
}
示例2: Test_BOPropLookupList_CreateWithLookupList
public void Test_BOPropLookupList_CreateWithLookupList()
{
//---------------Set up test pack-------------------
PropDef def = new PropDef("PropName", typeof(Guid), PropReadWriteRule.ReadWrite, null)
{LookupList = new SimpleLookupList(_collection)};
//---------------Assert Precondition----------------
Assert.IsTrue(def.HasLookupList());
//---------------Execute Test ----------------------
BOPropLookupList boPropLookupList = new BOPropLookupList(def);
//---------------Test Result -----------------------
Assert.IsNotNull(boPropLookupList);
}
示例3: TestCreateBOPropWithLookupList_CorrectPropCreated_WithDefaultValue
public void TestCreateBOPropWithLookupList_CorrectPropCreated_WithDefaultValue()
{
//---------------Set up test pack-------------------
PropDef propDef = new PropDef("PropName", typeof(int), PropReadWriteRule.ReadWrite, null,99);
Dictionary<string, string> collection = new Dictionary<string, string>();
SimpleLookupList simpleLookupList = new SimpleLookupList(collection);
propDef.LookupList = simpleLookupList;
//-----Test PreCondition--------------------------
Assert.IsTrue(propDef.HasLookupList());
//---------------Execute Test ----------------------
IBOProp prop = propDef.CreateBOProp(true);
//---------------Test Result -----------------------
Assert.IsInstanceOf(typeof(BOPropLookupList), prop);
}
示例4: Test_BOPropLookupList_CreateNoLookupList_DefaultConstructor
public void Test_BOPropLookupList_CreateNoLookupList_DefaultConstructor()
{
//---------------Set up test pack-------------------
PropDef def = new PropDef("PropName", typeof(Guid), PropReadWriteRule.ReadWrite, null);
//---------------Assert Precondition----------------
Assert.IsFalse(def.HasLookupList());
//---------------Execute Test ----------------------
try
{
new BOPropLookupList(def, NewGuidAsStdString());
Assert.Fail("expected Err");
}
//---------------Test Result -----------------------
catch (HabaneroDeveloperException ex)
{
StringAssert.Contains("The application tried to configure a BOPropLookupList - with the propDef", ex.DeveloperMessage);
StringAssert.Contains("does not have a lookup list defined", ex.DeveloperMessage);
}
}