public void ShouldReturnFilenameIfSupplied() { var mockFormatter = new Mock <ICSVFormatter>(); var options = new Options { OutputFileName = "bob.csv", GenerateAnalysis = true }; var sut = new CSVAnalysisWriter(mockFormatter.Object); var detailedReport = new detailedreport(); sut.GetOutputFilename(detailedReport, options).ShouldBe("bob_sca.csv"); }
public void ShouldReturnFilenameFromXML() { var mockFormatter = new Mock <ICSVFormatter>(); var options = new Options { GenerateAnalysis = true }; var sut = new CSVAnalysisWriter(mockFormatter.Object); var detailedReport = new detailedreport { app_name = "sca app name" }; sut.GetOutputFilename(detailedReport, options).ShouldBe("sca app name_sca.csv"); }