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);
        }
Example #2
0
        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);
        }
Example #3
0
        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);
        }