当前位置: 首页>>代码示例>>C#>>正文


C# PropDef.HasLookupList方法代码示例

本文整理汇总了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);

        }
开发者ID:Chillisoft,项目名称:habanero,代码行数:16,代码来源:TestPropDef.cs

示例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);
 }
开发者ID:kevinbosman,项目名称:habanero,代码行数:12,代码来源:TestBOPropLookupList_SimpleLookupList.cs

示例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);
 }
开发者ID:Chillisoft,项目名称:habanero,代码行数:14,代码来源:TestPropDef.cs

示例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);
     }
 }
开发者ID:kevinbosman,项目名称:habanero,代码行数:19,代码来源:TestBOPropLookupList_SimpleLookupList.cs


注:本文中的PropDef.HasLookupList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。