private bool BuildAndRunMutationTest(MutationTest mutationTest) { var outputOption = Options.Options.OfType <Output>().FirstOrDefault(); if (outputOption != null) { string outputPath = Path.Combine(Environment.CurrentDirectory, outputOption.FileName); mutationTest.MergeReportTo(outputPath); } var turtlesOption = Options.Options.OfType <TurtlesTypes>().FirstOrDefault(); if (turtlesOption != null) { mutationTest.With(turtlesOption.Types); } bool result = false; try { mutationTest.Run(Options.Options.Any(o => o is DetachBench)); result = true; } catch (MutationTestFailureException) { } catch (Exception ex) { System.Console.Error.WriteLine("An error occur during mutation test of {0}:\n{1}\nThe corresponding report was not merged", mutationTest.TargetMethod, ex); return(false); } _report.MergeMutationTestReport(mutationTest.Report); return(result); }
private bool BuildAndRunMutationTest(MutationTest mutationTest) { var outputOption = Options.Options.OfType<Output>().FirstOrDefault(); if (outputOption != null) { string outputPath = Path.Combine(Environment.CurrentDirectory, outputOption.FileName); mutationTest.MergeReportTo(outputPath); } bool result = false; try { mutationTest.Run(); result = true; } catch (MutationTestFailureException) { } catch (Exception ex) { Debugger.Launch(); _message = @" An exception was thrown setting up the mutation tests. The exception details are below. If you are unable to resolve the problem from these details, please post the details in our issue tracker at: http://ninjaturtles.codeplex.com/workitem/list/basic Exception details: " + ex; } return result; }