Пример #1
0
 public object countsFromExecutingSnippetWithSimulatedEvaluationResult(string snippet, string simulatedResult)
 {
     TestRig harness = new TestRig();
     if (simulatedResult.Equals("(An exception)"))
     {
         harness.WithStubbedEvaluationResult(new Exception("simulated exception"));
     }
     else
     {
         harness.WithStubbedEvaluationResult(simulatedResult);
     }
     return harness.ProcessFragment(snippet);
 }
Пример #2
0
        public object countsFromExecutingSnippetWithSimulatedEvaluationResult(string snippet, string simulatedResult)
        {
            TestRig harness = new TestRig();

            if (simulatedResult.Equals("(An exception)"))
            {
                harness.WithStubbedEvaluationResult(new Exception("simulated exception"));
            }
            else
            {
                harness.WithStubbedEvaluationResult(simulatedResult);
            }
            return(harness.ProcessFragment(snippet));
        }