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


C# DataListViewModel.UpdateDataListItems方法代码示例

本文整理汇总了C#中Dev2.Studio.ViewModels.DataList.DataListViewModel.UpdateDataListItems方法的典型用法代码示例。如果您正苦于以下问题:C# DataListViewModel.UpdateDataListItems方法的具体用法?C# DataListViewModel.UpdateDataListItems怎么用?C# DataListViewModel.UpdateDataListItems使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Dev2.Studio.ViewModels.DataList.DataListViewModel的用法示例。


在下文中一共展示了DataListViewModel.UpdateDataListItems方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: DataListViewModel

 public void DataListViewModel_UpdateDataListItems_WithNoMissingRecsetFieldWorkflowItems_ShouldMarkRecsetFieldValueIsUsedTrue()
 {
     //------------Setup for test--------------------------
     IResourceModel resourceModel = new Mock<IResourceModel>().Object;
     var dataListViewModel = new DataListViewModel(new Mock<IEventAggregator>().Object);
     dataListViewModel.InitializeDataListViewModel(resourceModel);
     const string recsetName = "recset";
     const string firstFieldName = "f1";
     IDataListItemModel recSetDataModel = DataListItemModelFactory.CreateDataListModel(recsetName, "A recordset of information about a car", enDev2ColumnArgumentDirection.Both);
     IDataListItemModel firstFieldDataListItemModel = CreateFieldDataListModel(firstFieldName, recSetDataModel);
     recSetDataModel.IsUsed = false;
     firstFieldDataListItemModel.IsUsed = false;
     recSetDataModel.Children.Add(firstFieldDataListItemModel);
     dataListViewModel.RecsetCollection.Add(recSetDataModel);
     var dataListParts = new List<IDataListVerifyPart>();
     var part = CreateRecsetPart(recsetName, firstFieldName);
     dataListParts.Add(part.Object);
     //------------Execute Test---------------------------
     dataListViewModel.UpdateDataListItems(resourceModel, dataListParts);
     //------------Assert Results-------------------------
     Assert.IsTrue(dataListViewModel.RecsetCollection[0].Children[0].IsUsed);
 }
开发者ID:FerdinandOlivier,项目名称:Warewolf-ESB,代码行数:22,代码来源:DataListViewModelTests.cs

示例2: DataListViewModel_UpdateDataListItems_DataListHasNoParts_UpdateIntellisenseMessageIsPublished

 public void DataListViewModel_UpdateDataListItems_DataListHasNoParts_UpdateIntellisenseMessageIsPublished()
 {
     //------------Setup for test--------------------------
     IResourceModel resourceModel = new Mock<IResourceModel>().Object;
     Mock<IEventAggregator> eventAggregator = new Mock<IEventAggregator>();
     var dataListViewModel = new DataListViewModel(eventAggregator.Object);
     dataListViewModel.InitializeDataListViewModel(resourceModel);
     eventAggregator.Setup(c => c.Publish(It.IsAny<UpdateIntellisenseMessage>())).Verifiable();
     var dataListParts = new List<IDataListVerifyPart>();
     //------------Execute Test---------------------------
     dataListViewModel.UpdateDataListItems(resourceModel, dataListParts);
     //------------Assert Results-------------------------
     eventAggregator.Verify(c => c.Publish(It.IsAny<UpdateIntellisenseMessage>()), Times.Once());
 }
开发者ID:FerdinandOlivier,项目名称:Warewolf-ESB,代码行数:14,代码来源:DataListViewModelTests.cs

示例3: DataListViewModel_UpdateDataListItems_NoMissingScalarWorkflowItems_ShouldMarkScalarValuesUsedTrue

 public void DataListViewModel_UpdateDataListItems_NoMissingScalarWorkflowItems_ShouldMarkScalarValuesUsedTrue()
 {
     //------------Setup for test--------------------------
     IResourceModel resourceModel = new Mock<IResourceModel>().Object;
     var dataListViewModel = new DataListViewModel(new Mock<IEventAggregator>().Object);
     dataListViewModel.InitializeDataListViewModel(resourceModel);
     const string scalarName = "scalar";
     var scalarItem = new DataListItemModel(scalarName) { IsUsed = false };
     dataListViewModel.ScalarCollection.Add(scalarItem);
     var parts = new List<IDataListVerifyPart> { CreateScalarPart(scalarName).Object };
     //------------Execute Test---------------------------
     dataListViewModel.UpdateDataListItems(resourceModel, parts);
     //------------Assert Results-------------------------
     Assert.IsTrue(dataListViewModel.ScalarCollection[0].IsUsed);
 }
开发者ID:FerdinandOlivier,项目名称:Warewolf-ESB,代码行数:15,代码来源:DataListViewModelTests.cs


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