예제 #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));
        }