public void CheckHelpMessage() { var helper = new TestHelperMethods(); File.Delete(helper.DefaultYoCodeReportPath); const string argument = "YoCode.dll --help --silent"; helper.OutputTestDebugInfo(xunitOutput, argument); TestHelperMethods.RunProcessAndGatherOutput("dotnet", helper.DllPath, argument, xunitOutput); var actualPath = Path.Combine(helper.TestPath, "ActualOutputs\\helpMessage.html"); var expectedPath = Path.Combine(helper.TestPath, "ExpectedOutputs\\helpMessage.html"); File.Copy(helper.DefaultYoCodeReportPath, actualPath, true); TestHelperMethods.FilesAreDifferent(actualPath, expectedPath).Should().BeFalse($"{actualPath} was different to {expectedPath}"); }
public void CompareProjects(string outputFile, string project) { var helper = new TestHelperMethods(); var actualDir = Path.Combine(helper.TestPath, "ActualOutputs"); var actualPath = Path.Combine(actualDir, helper.OutputFilename); string argument = $"YoCode.dll --input={helper.TestPath}\\TestProjects{project} --noloading --silent --output={actualDir}"; helper.OutputTestDebugInfo(xunitOutput, argument); File.Delete(actualPath); TestHelperMethods.RunProcessAndGatherOutput("dotnet", helper.DllPath, argument, xunitOutput); var actualWantedPath = Path.Combine(actualDir, outputFile); var expectedPath = Path.Combine(helper.TestPath, "ExpectedOutputs", outputFile); File.Copy(actualPath, actualWantedPath, true); TestHelperMethods.FilesAreDifferent(actualPath, expectedPath).Should().BeFalse($"{actualPath} was different to {expectedPath}"); }