Execute() public méthode

public Execute ( StringBuilder>.Dictionary values, IWorkspace theWorkspace ) : StringBuilder
values StringBuilder>.Dictionary
theWorkspace IWorkspace
Résultat StringBuilder
        public void FetchDebugItemFileExecuteWithNullValuesExpectedException()
        {

            var esb = new FetchDebugItemFile();
            var actual = esb.Execute(null, null);
            var msg = ConvertToMsg(actual);
            Assert.AreEqual(string.Empty, msg.Message.ToString());
        }
        public void FetchDebugItemFileExecuteWithNullDebugItemFileExpectedException()
        {

            var esb = new FetchDebugItemFile();
            var actual = esb.Execute(new Dictionary<string, StringBuilder> { { "DebugItemFilePath", null } }, null);
            var msg = ConvertToMsg(actual);
            Assert.AreEqual(string.Empty, msg.Message.ToString());
        }
        public void FetchDebugItemFileExecuteWithExistingLogExpectedReturnsContentsOfLog()
        {
            const string Expected = "Hello world";
            var serverLogPath = Path.Combine(_testDir, string.Format("ServerLog_{0}.txt", Guid.NewGuid()));
            File.WriteAllText(serverLogPath, Expected);

            var esb = new FetchDebugItemFile();
            var actual = esb.Execute(new Dictionary<string, StringBuilder> { { "DebugItemFilePath", new StringBuilder(serverLogPath) } }, null);
            var msg = ConvertToMsg(actual);
            StringAssert.Contains(msg.Message.ToString(), Expected);
        }
// ReSharper disable InconsistentNaming
        public void FetchDebugItemFile_Execute_FileHasMultiLines_ReturnedMessageWillBeMultiLines()
// ReSharper restore InconsistentNaming
        {
            var multiLines = new StringBuilder();
            multiLines.AppendLine("Line One");
            multiLines.AppendLine("Line Two");
            multiLines.AppendLine("Line Three");

            var serverLogPath = Path.Combine(_testDir, string.Format("ServerLog_{0}.txt", Guid.NewGuid()));
            var multiLineString = multiLines.ToString();    
            File.WriteAllText(serverLogPath, multiLineString);

            var esb = new FetchDebugItemFile();
            var actual = esb.Execute(new Dictionary<string, StringBuilder> { { "DebugItemFilePath", new StringBuilder(serverLogPath) } }, null);
            var msg = ConvertToMsg(actual);
            StringAssert.Contains(msg.Message.ToString(), multiLineString);
        }