public void Run_WhenConsoleReadLine_ConsoleInputIsRequested()
        {
            const string code = @"using System;
					
public class Program
{
	public static void Main()
    {
		Console.WriteLine(""Who are you?"");
		string name = Console.ReadLine();
    }
}";

            var runOpts = new ConsoleOrScriptRunOpts()
            {
                CodeBlock = new ConsoleOrScriptCodeBlock {
                    CodeBlock = code
                },
                Language    = Language.CSharp,
                ProjectType = ProjectType.Console,
            };

            RunResult result = CodeHelperTestUtils.RunInThread(_codeHelper, runOpts);

            Assert.IsTrue(result.IsSuccess);
            Assert.IsTrue(result.IsConsoleInputRequested);
            Assert.IsNull(result.CompilerErrors);
        }
        public void Run_WhenConsoleReadLine_InputTagAreIncrementedInConsoleOutput()
        {
            //============== first run

            const string  code    = @"using System;
					
public class Program
{
	public static void Main()
    {
		Console.WriteLine(""Who are you?"");
		string name = Console.ReadLine();
		Console.WriteLine(""Hello {0} , how old are You?"", name);
		string age = Console.ReadLine();
		Console.WriteLine(""Ok Mike , Mike is enough!"");
    }
}";
            List <string> input   = null;
            var           runOpts = new ConsoleOrScriptRunOpts()
            {
                CodeBlock = new ConsoleOrScriptCodeBlock {
                    CodeBlock = code
                },
                Language          = Language.CSharp,
                ProjectType       = ProjectType.Console,
                ConsoleInputLines = input
            };
            string expectedResult = "Who are you?";

            RunResult result = CodeHelperTestUtils.RunInThread(_codeHelper, runOpts);

            Assert.IsTrue(result.IsSuccess);
            Assert.IsTrue(result.IsConsoleInputRequested);
            Assert.AreEqual(expectedResult, result.ConsoleOutput);
            Assert.IsNull(result.CompilerErrors);

            //================================== second run

            input = new List <string> {
                "Mike"
            };
            runOpts = new ConsoleOrScriptRunOpts()
            {
                CodeBlock = new ConsoleOrScriptCodeBlock {
                    CodeBlock = code
                },
                Language          = Language.CSharp,
                ProjectType       = ProjectType.Console,
                ConsoleInputLines = input
            };
            expectedResult = string.Format(@"Who are you?
{0}0{1}
Hello Mike , how old are You?", CodeHelper.ConsoleInputLineStart, CodeHelper.ConsoleInputLineEnd);

            result = CodeHelperTestUtils.RunInThread(new CSharpConsoleCodeHelper(), runOpts);

            Assert.IsTrue(result.IsSuccess);
            Assert.IsTrue(result.IsConsoleInputRequested);
            Assert.AreEqual(expectedResult, result.ConsoleOutput);
            Assert.IsNull(result.CompilerErrors);

            //================================== third run

            input = new List <string> {
                "Mike", "27"
            };
            runOpts = new ConsoleOrScriptRunOpts()
            {
                CodeBlock = new ConsoleOrScriptCodeBlock {
                    CodeBlock = code
                },
                Language          = Language.CSharp,
                ProjectType       = ProjectType.Console,
                ConsoleInputLines = input
            };
            expectedResult = string.Format(@"Who are you?
{0}0{1}
Hello Mike , how old are You?
{0}1{1}
Ok Mike , Mike is enough!", CodeHelper.ConsoleInputLineStart, CodeHelper.ConsoleInputLineEnd);

            result = CodeHelperTestUtils.RunInThread(new CSharpConsoleCodeHelper(), runOpts);

            Assert.IsTrue(result.IsSuccess);
            Assert.IsFalse(result.IsConsoleInputRequested);
            Assert.AreEqual(expectedResult, result.ConsoleOutput);
            Assert.IsNull(result.CompilerErrors);
        }