private static TestRun CreateTestRun(TestSolution solution)
        {
            var actualTestRunResult   = TestRunResultReader.ReadActual(solution);
            var expectedTestRunResult = TestRunResultReader.ReadExpected(solution);

            return(new TestRun(expectedTestRunResult, actualTestRunResult));
        }
 public static TestRun Run(TestSolution testSolution)
 {
     RunSolutionTestScript(testSolution);
     return(CreateTestRun(testSolution));
 }
 private static void RunSolutionTestScript(TestSolution testSolution) =>
 Process.Start("pwsh", $"{DirectoryHelper.FindFileInTree("run.ps1")} {testSolution.Slug} {testSolution.Directory} {testSolution.Directory}")?.WaitForExit();
 public static string ReadExpected(TestSolution solution) =>
 ReadFile(solution, "expected_results.json");
 public static string ReadActual(TestSolution solution) =>
 ReadFile(solution, "results.json");
 private static string ReadFile(TestSolution solution, string fileName) =>
 File.ReadAllText(Path.Combine(solution.Directory, fileName));