public void SetMethodTwice()
 {
     Reduction r = new Reduction("return 42;");
     MethodInfo m = typeof(TestReduction).GetMethod("SetMethodTwice");
     r.SetCompiledMethod(m);
     r.SetCompiledMethod(m);
 }
 public void SetNullCompiledMethod()
 {
     Reduction r = new Reduction("return \"hi\";");
     r.SetCompiledMethod(null);
 }
 public void SetCompiledMethod()
 {
     Reduction r = new Reduction("return \"hi\";");
     r.SetCompiledMethod(typeof(TestReduction).GetMethod("MyMethod", BindingFlags.Static | BindingFlags.Public));
     Assert.AreEqual("there", r.Apply(null));
 }