public Execute ( StringBuilder>.Dictionary |
||
values | StringBuilder>.Dictionary | |
theWorkspace | IWorkspace | |
Результат | StringBuilder |
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()); }
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()); }
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()); }