Execute() public method

public Execute ( StringBuilder>.Dictionary values, IWorkspace theWorkspace ) : StringBuilder
values StringBuilder>.Dictionary
theWorkspace IWorkspace
return StringBuilder
Ejemplo n.º 1
0
 public void ExecuteExpectTaskTerminated()
 {
     ExecutableServiceRepository.Instance.Clear();
     var service = GetExecutableService();
     ExecutableServiceRepository.Instance.Add(service.Object);
     var terminateExecution = new TerminateExecution();
     terminateExecution.Execute(GetDictionary(), GetWorkspace().Object);
     service.Verify(s => s.Terminate(), Times.Once());
 }
Ejemplo n.º 2
0
        public void ExecuteExpectSuccessResult()
        {
            ExecutableServiceRepository.Instance.Clear();
            var service = GetExecutableService();
            ExecutableServiceRepository.Instance.Add(service.Object);
            var terminateExecution = new TerminateExecution();
            var result = terminateExecution.Execute(GetDictionary(), GetWorkspace().Object);

            const string Expected = "Message: Workflow successfully terminated";
            var obj = ConvertToMsg(result.ToString());

            Assert.AreEqual(Expected, obj.Message.ToString());

        }
Ejemplo n.º 3
0
        public void ExecuteExpectFailResultIfNoServiceExist()
        {
            ExecutableServiceRepository.Instance.Clear();
            const string Expected = "Message: Failed to stop the workflow execution. It may have completed already.";
            var terminateExecution = new TerminateExecution();
            var result = terminateExecution.Execute(GetDictionary(), GetWorkspace().Object);

            var obj = ConvertToMsg(result.ToString());

            Assert.AreEqual(Expected, obj.Message.ToString());
        }