DoDrop() public method

public DoDrop ( IDataObject dataObject ) : bool
dataObject IDataObject
return bool
 public void SequenceDesignerViewModel_DoDrop_WhenFormatDoesNotContainModelItemFormat_ActivityNotAdded()
 {
     //------------Setup for test--------------------------
     var dsfSequenceActivity = new DsfSequenceActivity();
     var dsfMultiAssignActivity = new DsfMultiAssignActivity();
     dsfSequenceActivity.Activities.Add(dsfMultiAssignActivity);
     var dsfFindRecordsMultipleCriteriaActivity = new DsfFindRecordsMultipleCriteriaActivity();
     dsfSequenceActivity.Activities.Add(dsfFindRecordsMultipleCriteriaActivity);
     var sequenceDesignerViewModel = new SequenceDesignerViewModel(CreateModelItem(dsfSequenceActivity));
     var dataObjectMock = new Mock<IDataObject>();
     dataObjectMock.Setup(o => o.GetFormats()).Returns(new[] { "Something Else" });
     dataObjectMock.Setup(o => o.GetData("Something Else")).Returns(ModelItemUtils.CreateModelItem(new DsfGatherSystemInformationActivity()));
     //------------Execute Test---------------------------
     bool doDrop = sequenceDesignerViewModel.DoDrop(dataObjectMock.Object);
     //------------Assert Results-------------------------
     Assert.IsFalse(doDrop);
     Assert.AreEqual(2, dsfSequenceActivity.Activities.Count);
 }
 public void SequenceDesignerViewModel_DoDrop_WhenModelItemsFormatHasSingleItem_ActivitiesAdded()
 {
     //------------Setup for test--------------------------
     var dsfSequenceActivity = new DsfSequenceActivity();
     var dsfMultiAssignActivity = new DsfMultiAssignActivity();
     dsfSequenceActivity.Activities.Add(dsfMultiAssignActivity);
     var dsfFindRecordsMultipleCriteriaActivity = new DsfFindRecordsMultipleCriteriaActivity();
     dsfSequenceActivity.Activities.Add(dsfFindRecordsMultipleCriteriaActivity);
     var sequenceDesignerViewModel = new SequenceDesignerViewModel(CreateModelItem(dsfSequenceActivity));
     var dataObjectMock = new Mock<IDataObject>();
     dataObjectMock.Setup(o => o.GetFormats()).Returns(new[] { "ModelItemsFormat" });
     dataObjectMock.Setup(o => o.GetData("ModelItemsFormat")).Returns(new List<ModelItem> { ModelItemUtils.CreateModelItem(new DsfGatherSystemInformationActivity()) });
     //------------Execute Test---------------------------
     bool doDrop = sequenceDesignerViewModel.DoDrop(dataObjectMock.Object);
     //------------Assert Results-------------------------
     Assert.IsTrue(doDrop);
     Assert.AreEqual(3, dsfSequenceActivity.Activities.Count);
 }
 public void SequenceDesignerViewModel_DoDrop_WhenNoFormats_ActivityNotAdded()
 {
     //------------Setup for test--------------------------
     var dsfSequenceActivity = new DsfSequenceActivity();
     var dsfMultiAssignActivity = new DsfMultiAssignActivity();
     dsfSequenceActivity.Activities.Add(dsfMultiAssignActivity);
     var dsfFindRecordsMultipleCriteriaActivity = new DsfFindRecordsMultipleCriteriaActivity();
     dsfSequenceActivity.Activities.Add(dsfFindRecordsMultipleCriteriaActivity);
     var sequenceDesignerViewModel = new SequenceDesignerViewModel(CreateModelItem(dsfSequenceActivity));
     var dataObjectMock = new Mock<IDataObject>();
     dataObjectMock.Setup(o => o.GetFormats()).Returns(new string[] { });
     //------------Execute Test---------------------------
     bool doDrop = sequenceDesignerViewModel.DoDrop(dataObjectMock.Object);
     //------------Assert Results-------------------------
     Assert.IsFalse(doDrop);
     Assert.AreEqual(2, dsfSequenceActivity.Activities.Count);
 }