本文整理汇总了C#中Dev2.Studio.ViewModels.DataList.DataListViewModel.MissingDataListParts方法的典型用法代码示例。如果您正苦于以下问题:C# DataListViewModel.MissingDataListParts方法的具体用法?C# DataListViewModel.MissingDataListParts怎么用?C# DataListViewModel.MissingDataListParts使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Dev2.Studio.ViewModels.DataList.DataListViewModel
的用法示例。
在下文中一共展示了DataListViewModel.MissingDataListParts方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DataListViewModel_MissingDataListParts_WithRecsetPartNotInDataList_ShouldReturnPartInList
public void DataListViewModel_MissingDataListParts_WithRecsetPartNotInDataList_ShouldReturnPartInList()
{
//------------Setup for test--------------------------
var dataListViewModel = new DataListViewModel(new Mock<IEventAggregator>().Object);
const string recsetName = "recset";
const string firstFieldName = "f1";
var dataListParts = new List<IDataListVerifyPart>();
var part = CreateRecsetPart(recsetName, firstFieldName);
dataListParts.Add(part.Object);
//----------------------Precondition----------------------------
//------------Execute Test---------------------------
List<IDataListVerifyPart> missingDataListParts = dataListViewModel.MissingDataListParts(dataListParts);
//------------Assert Results-------------------------
Assert.AreEqual(1, missingDataListParts.Count);
}
示例2: DataListViewModel_MissingDataListParts_WithRecsetFieldPartInDataList_ShouldNotReturnPartInList
public void DataListViewModel_MissingDataListParts_WithRecsetFieldPartInDataList_ShouldNotReturnPartInList()
{
//------------Setup for test--------------------------
var dataListViewModel = new DataListViewModel(new Mock<IEventAggregator>().Object);
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.Children.Add(firstFieldDataListItemModel);
recSetDataModel.Children.Add(CreateFieldDataListModel("f2", recSetDataModel));
dataListViewModel.RecsetCollection.Add(recSetDataModel);
var dataListParts = new List<IDataListVerifyPart>();
var part = CreateRecsetPart(recsetName, firstFieldName);
dataListParts.Add(part.Object);
//----------------------Precondition----------------------------
Assert.AreEqual(2, dataListViewModel.RecsetCollection[0].Children.Count);
//------------Execute Test---------------------------
List<IDataListVerifyPart> missingDataListParts = dataListViewModel.MissingDataListParts(dataListParts);
//------------Assert Results-------------------------
Assert.AreEqual(0, missingDataListParts.Count);
}
示例3: DataListViewModel_MissingDataListParts_ScalarPartInDataList_ShouldNotReturnPartInList
public void DataListViewModel_MissingDataListParts_ScalarPartInDataList_ShouldNotReturnPartInList()
{
//------------Setup for test--------------------------
var dataListViewModel = new DataListViewModel(new Mock<IEventAggregator>().Object);
const string scalarName = "scalar";
var scalarItem = new DataListItemModel(scalarName);
dataListViewModel.ScalarCollection.Add(scalarItem);
var parts = new List<IDataListVerifyPart> { CreateScalarPart(scalarName).Object };
//----------------------Precondition----------------------------
Assert.AreEqual(1, dataListViewModel.ScalarCollection.Count);
//------------Execute Test---------------------------
List<IDataListVerifyPart> missingDataListParts = dataListViewModel.MissingDataListParts(parts);
//------------Assert Results-------------------------
Assert.AreEqual(0, missingDataListParts.Count);
}