public void DirectoryResultHasCorrectTotalLines_GivenFileResults() { var resultLines = 10; var fileResults = MakeTestResults(10, "test/path", resultLines); var expectedLines = resultLines * fileResults.Count; var result = new DirectoryAnalysis("test/directory", fileResults); Assert.AreEqual(expectedLines, result.TotalLines); }
public void DirectoryResultHasCorrectFileTypeCalculations_GivenFileResults() { var fileResults = new List <FileAnalysis>(); fileResults.AddRange(MakeTestResults(10, "test/path.extension1", 10)); fileResults.AddRange(MakeTestResults(10, "test/path.extension2", 10)); var result = new DirectoryAnalysis("test/directory", fileResults); var expectedLines = new Dictionary <string, int> { { "extension1", 100 }, { "extension2", 100 } }; Assert.AreEqual(expectedLines, result.LinesByExtension); }
public ProjectAnalysis(Project project, DirectoryAnalysis results) { Project = project; Results = results; }