Ejemplo n.º 1
0
        public void DoEvaluateImmediately_WithNull_ThrowsArgumentNullException()
        {
            var parser      = MakeParser();
            var inputOutput = MakeInputOutput();
            var rte         = MakeRunTimeEnvironment(inputOutput);
            var repl        = new ReadEvaluatePrintLoop(rte, parser);

            var condition = repl.DoEvaluateImmediately(null);
        }
Ejemplo n.º 2
0
        public void Evaluate_WithExceptedStatement_ThrowsRunTimeException()
        {
            var parser      = MakeParser();
            var inputOutput = MakeInputOutput();
            var rte         = MakeRunTimeEnvironment(inputOutput);
            var repl        = new ReadEvaluatePrintLoop(rte, parser);

            var statement = MakeStatement(() => { throw new Exception(); });

            repl.Evaluate(statement);

            var condition = repl.DoEvaluateImmediately(null);
        }