public WorkflowDesignerViewModelMock(IContextualResourceModel resource, IWorkflowHelper workflowHelper, IPopupController popupController, bool createDesigner = false) : base(new Mock<IEventAggregator>().Object, resource, workflowHelper, popupController, new TestAsyncWorker(), createDesigner, false, false) { _moq.SetupAllProperties(); _wd = _moq.Object; }
public WorkflowDesignerViewModelMock(IContextualResourceModel resource, IWorkflowHelper workflowHelper, IPopupController popupController, IExternalProcessExecutor processExecutor, bool createDesigner = false) : base( new Mock <IEventAggregator>().Object, resource, workflowHelper, popupController, new SynchronousAsyncWorker(), createDesigner, false) { _wd = _moq.Object; }
public WorkflowDesignerViewModelMock(IContextualResourceModel resource, IWorkflowHelper workflowHelper, IPopupController popupController, bool createDesigner = false) : base( new Mock <IEventAggregator>().Object, resource, workflowHelper, popupController, AsyncWorkerTests.CreateSynchronousAsyncWorker().Object, createDesigner, false, false) { _moq.SetupAllProperties(); _wd = _moq.Object; }
public WorkflowDesignerViewModelMock(IContextualResourceModel resource, IWorkflowHelper workflowHelper, IEventAggregator eventAggregator, bool createDesigner = false) : base( eventAggregator, resource, workflowHelper, new Mock <IPopupController>().Object, new TestAsyncWorker(), createDesigner, false, false) { _moq.SetupAllProperties(); _wd = _moq.Object; }
public WorkflowDesignerViewModelMock(IContextualResourceModel resource, IWorkflowHelper workflowHelper, IEventAggregator eventAggregator, ModelService modelService, bool createDesigner = false) : base( eventAggregator, resource, workflowHelper, new Mock <IPopupController>().Object, new SynchronousAsyncWorker(), new Mock <IExternalProcessExecutor>().Object, createDesigner, false) { _moq.SetupAllProperties(); _wd = _moq.Object; ModelService = modelService; }
private void _convert_Execute(object sender, SingleChoiceActionExecuteEventArgs e) { IObjectSpace objectSpace = Application.CreateObjectSpace(); Session session = ((XPObjectSpace)objectSpace).Session; this.SourceObject = session.FindObject(this.View.CurrentObject.GetType(), CriteriaOperator.Parse("Oid == ?", (this.View.CurrentObject as BaseObject).Oid)) as WorkflowBase; this.TargetObject = IWorkflowHelper.Convert(session, (this._convert.SelectedItem.Data as Type), this.SourceObject); if (this.TargetObject != null) { this.RedirectToDetailView(objectSpace); } }
public MergePreviewWorkflowDesignerViewModel(IWorkflowDesignerWrapper workflowDesignerHelper, IEventAggregator eventPublisher, IContextualResourceModel resource, IWorkflowHelper workflowHelper, IPopupController popupController, IAsyncWorker asyncWorker, bool createDesigner, bool liteInit) : base(eventPublisher, resource, workflowHelper, popupController, asyncWorker, createDesigner, liteInit) { }
static WorkflowDesignerViewModel CreateWorkflowDesignerViewModel(IEventAggregator eventPublisher, IContextualResourceModel resourceModel, IWorkflowHelper workflowHelper = null, bool createDesigner = true, string helperText = null) { eventPublisher = eventPublisher ?? new Mock<IEventAggregator>().Object; var popupController = new Mock<IPopupController>(); if (workflowHelper == null) { var wh = new Mock<IWorkflowHelper>(); wh.Setup(h => h.CreateWorkflow(It.IsAny<string>())).Returns(() => new ActivityBuilder { Implementation = new DynamicActivity() }); if (helperText != null) { wh.Setup(h => h.SanitizeXaml(It.IsAny<StringBuilder>())).Returns(new StringBuilder(helperText)); } workflowHelper = wh.Object; } var viewModel = new WorkflowDesignerViewModel(eventPublisher, resourceModel, workflowHelper, popupController.Object, new TestAsyncWorker(), createDesigner, _isDesignerInited, false); _isDesignerInited = true; return viewModel; }
static WorkflowDesignerViewModel CreateWorkflowDesignerViewModel(IContextualResourceModel resourceModel, IWorkflowHelper workflowHelper = null, bool createDesigner = true, string helperText = null) { return CreateWorkflowDesignerViewModel(null, resourceModel, workflowHelper, createDesigner, helperText); }
// BUG 9304 - 2013.05.08 - TWR - Added IWorkflowHelper parameter to facilitate testing public WfExecutionContainer(ServiceAction sa, IDSFDataObject dataObj, IWorkspace theWorkspace, IEsbChannel esbChannel, IWorkflowHelper workflowHelper) : base(sa, dataObj, theWorkspace, esbChannel) { _workflowHelper = workflowHelper; }
public WorkflowDesignerViewModelMock(IWorkflowDesignerWrapper workflowDesignerWrapper, IContextualResourceModel resource, IWorkflowHelper workflowHelper, IEventAggregator eventAggregator, WorkflowDesigner workflowDesigner, bool createDesigner = false) : base(workflowDesignerWrapper, eventAggregator, resource, workflowHelper, new Mock <IPopupController>().Object, new SynchronousAsyncWorker(), createDesigner, false) { _wd = workflowDesigner; }
// BUG 9304 - 2013.05.08 - TWR - Added IWorkflowHelper parameter to facilitate testing public WfExecutionContainer(ServiceAction sa, IDSFDataObject dataObj, IWorkspace theWorkspace, IEsbChannel esbChannel, IWorkflowHelper workflowHelper) : base(sa, dataObj, theWorkspace, esbChannel) { _workflowHelper = workflowHelper; }
static WorkflowDesignerViewModel CreateWorkflowDesignerViewModel(IEventAggregator eventPublisher, IContextualResourceModel resourceModel, IWorkflowHelper workflowHelper = null, bool createDesigner = true, string helperText = null) { eventPublisher = eventPublisher ?? new Mock <IEventAggregator>().Object; var popupController = new Mock <IPopupController>(); if (workflowHelper == null) { var wh = new Mock <IWorkflowHelper>(); wh.Setup(h => h.CreateWorkflow(It.IsAny <string>())).Returns(() => new ActivityBuilder { Implementation = new DynamicActivity() }); if (helperText != null) { wh.Setup(h => h.SanitizeXaml(It.IsAny <StringBuilder>())).Returns(new StringBuilder(helperText)); } workflowHelper = wh.Object; } var viewModel = new WorkflowDesignerViewModel(eventPublisher, resourceModel, workflowHelper, popupController.Object, new SynchronousAsyncWorker(), createDesigner, true); return(viewModel); }
static WorkflowDesignerViewModel CreateWorkflowDesignerViewModel(IContextualResourceModel resourceModel, IWorkflowHelper workflowHelper = null, bool createDesigner = true, string helperText = null) { return(CreateWorkflowDesignerViewModel(null, resourceModel, workflowHelper, createDesigner, helperText)); }
private void ObjectSpace_ObjectSaved(object sender, ObjectManipulatingEventArgs e) { IWorkflowHelper.ConvertSaved(this.TargetObject, this.SourceObject); TargetObjectSaved = true; }