public WorkflowClient(IWorkflowStore workflowStore, IWorkflowRegistrationService workflowRegistrationService, ICommandFactory commandFactory) { _workflowStore = workflowStore; _workflowRegistrationService = workflowRegistrationService; this.CommandFactory = commandFactory; }
public void IsSingleInstanceWorkflowRegistered_OnExecute_UsesService() { // set up the store and the workflows IWorkflowStore workflowStore = Substitute.For <IWorkflowStore>(); IWorkflowRegistrationService regService = Substitute.For <IWorkflowRegistrationService>(); IWorkflowServer workflowServer = new WorkflowServer(workflowStore, regService, Substitute.For <IWorkflowExceptionHandler>()); workflowServer.IsSingleInstanceWorkflowRegistered <BasicWorkflow>(); regService.Received(1).IsSingleInstanceWorkflowRegistered <BasicWorkflow>(workflowStore); }
public void IsSingleInstanceWorkflowRegistered_OnExecute_UsesService() { // set up the store and the workflows IWorkflowStore workflowStore = Substitute.For <IWorkflowStore>(); IWorkflowRegistrationService regService = Substitute.For <IWorkflowRegistrationService>(); IWorkflowClient workflowClient = new WorkflowClient(workflowStore, regService, Substitute.For <ICommandFactory>()); workflowClient.IsSingleInstanceWorkflowRegistered <BasicWorkflow>(); regService.Received(1).IsSingleInstanceWorkflowRegistered <BasicWorkflow>(workflowStore); }
public void RegisterWorkflow_OnRegister_UsesService() { // set up the store and the workflows IWorkflowStore workflowStore = Substitute.For <IWorkflowStore>(); IWorkflowRegistrationService regService = Substitute.For <IWorkflowRegistrationService>(); BasicWorkflow workflow = new BasicWorkflow(BasicWorkflow.State.Start); IWorkflowServer workflowServer = new WorkflowServer(workflowStore, regService, Substitute.For <IWorkflowExceptionHandler>()); workflowServer.RegisterWorkflow(workflow); regService.Received(1).RegisterWorkflow(workflowStore, workflow); }
public void Register_OnRegister_UsesService() { // set up the store and the workflows IWorkflowStore workflowStore = Substitute.For <IWorkflowStore>(); IWorkflowRegistrationService regService = Substitute.For <IWorkflowRegistrationService>(); BasicWorkflow workflow = new BasicWorkflow(BasicWorkflow.State.Start); IWorkflowClient workflowClient = new WorkflowClient(workflowStore, regService, Substitute.For <ICommandFactory>()); workflowClient.Register(workflow); regService.Received(1).RegisterWorkflow(workflowStore, workflow); }
public WorkflowServer(IWorkflowStore workflowStore, IWorkflowRegistrationService workflowRegistrationService, IWorkflowExceptionHandler exceptionHandler) { _workflowStore = workflowStore; _workflowRegistrationService = workflowRegistrationService; _exceptionHandler = exceptionHandler; }