public AddBlankRow ( IDataListItemModel item ) : void | ||
item | IDataListItemModel | |
Résultat | void |
public void WorkflowDesignerViewModel_BuildDataPart_ValidItem_ShouldAddItemToDataList() { //------------Setup for test-------------------------- var eventAggregator = new EventAggregator(); Mock<IContextualResourceModel> mockResourceModel = Dev2MockFactory.SetupResourceModelMock(); mockResourceModel.Setup(resModel => resModel.WorkflowXaml).Returns(WorkflowXAMLForTest()); var workflowDesigner = CreateWorkflowDesignerViewModel(eventAggregator, mockResourceModel.Object, null, false); var dataListViewModel = new DataListViewModel(); DataListSingleton.SetDataList(dataListViewModel); dataListViewModel.AddBlankRow(null); //------------Execute Test--------------------------- workflowDesigner.Handle(new AddStringListToDataListMessage(new List<string> { "[[rec().set]]", "[[test()]]", "[[scalar]]" })); //------------Assert Results------------------------- var dataListItemModels = DataListSingleton.ActiveDataList.DataList; workflowDesigner.Dispose(); Assert.AreEqual(5, dataListItemModels.Count); }