public Test BuildFrom(MethodInfo method) { if (method == null) { throw new ArgumentNullException("method"); } return(DecompilationTestFactory.CreateTestSuite(method)); }
public override void RunTestMethod(TestCaseResult testResult) { DecompilationTestAttribute attribute = DecompilationTestFactory.GetDecompilationTestAttribute(Method); var body = attribute.GetMethodBody(this.type); string path = string.Concat(DecompilationTestFixture.TestCasesDirectory, Path.DirectorySeparatorChar + resultFilename); if (attribute.Mode == Mode.MethodDefinition) { Reflect.InvokeMethod(Method, Fixture, new object[] { body.Method, File.ReadAllText(path) }); } else { Reflect.InvokeMethod(Method, Fixture, new object[] { body, File.ReadAllText(path) }); } }