| | | 1 | | using System.Collections.Generic; |
| | | 2 | | |
| | | 3 | | namespace DirectSight.Parser.Analysis; |
| | | 4 | | |
| | | 5 | | /// <summary> |
| | | 6 | | /// Full coverage information of a line in a source file. |
| | | 7 | | /// </summary> |
| | | 8 | | public class LineAnalysis : ShortLineAnalysis |
| | | 9 | | { |
| | | 10 | | /// <summary> |
| | | 11 | | /// Initializes a new instance of the <see cref="LineAnalysis" /> class. |
| | | 12 | | /// </summary> |
| | | 13 | | /// <param name="lineVisits">The number of line visits.</param> |
| | | 14 | | /// <param name="lineVisitStatus">The line visit status.</param> |
| | | 15 | | /// <param name="lineCoverageByTestMethod">The line coverage by test method.</param> |
| | | 16 | | /// <param name="lineNumber">The line number.</param> |
| | | 17 | | /// <param name="lineContent">Content of the line.</param> |
| | | 18 | | internal LineAnalysis(int lineVisits, LineVisitStatus lineVisitStatus, IDictionary<TestMethod, ShortLineAnalysis> li |
| | 2542 | 19 | | : base(lineVisits, lineVisitStatus) |
| | 2542 | 20 | | { |
| | 2542 | 21 | | this.LineCoverageByTestMethod = lineCoverageByTestMethod; |
| | 2542 | 22 | | this.LineNumber = lineNumber; |
| | 2542 | 23 | | this.LineContent = lineContent; |
| | 2542 | 24 | | } |
| | | 25 | | |
| | | 26 | | /// <summary> |
| | | 27 | | /// Initializes a new instance of the <see cref="LineAnalysis" /> class. |
| | | 28 | | /// </summary> |
| | | 29 | | /// <param name="lineVisits">The number of line visits.</param> |
| | | 30 | | /// <param name="lineVisitStatus">The line visit status.</param> |
| | | 31 | | /// <param name="lineCoverageByTestMethod">The line coverage by test method.</param> |
| | | 32 | | /// <param name="lineNumber">The line number.</param> |
| | | 33 | | /// <param name="lineContent">Content of the line.</param> |
| | | 34 | | /// <param name="coveredBranches">The covered branches.</param> |
| | | 35 | | /// <param name="totalBranches">The total branches.</param> |
| | | 36 | | internal LineAnalysis(int lineVisits, LineVisitStatus lineVisitStatus, IDictionary<TestMethod, ShortLineAnalysis> li |
| | 25 | 37 | | : this(lineVisits, lineVisitStatus, lineCoverageByTestMethod, lineNumber, lineContent) |
| | 25 | 38 | | { |
| | 25 | 39 | | this.CoveredBranches = coveredBranches; |
| | 25 | 40 | | this.TotalBranches = totalBranches; |
| | 25 | 41 | | } |
| | | 42 | | |
| | | 43 | | /// <summary> |
| | | 44 | | /// Gets the line number. |
| | | 45 | | /// </summary> |
| | 7606 | 46 | | public int LineNumber { get; } |
| | | 47 | | |
| | | 48 | | /// <summary> |
| | | 49 | | /// Gets the content of the line. |
| | | 50 | | /// </summary> |
| | | 51 | | /// <value> |
| | | 52 | | /// The content of the line. |
| | | 53 | | /// </value> |
| | 1330 | 54 | | public string LineContent { get; } |
| | | 55 | | |
| | | 56 | | /// <summary> |
| | | 57 | | /// Gets the line coverage by test method. |
| | | 58 | | /// </summary> |
| | | 59 | | /// <value> |
| | | 60 | | /// The line coverage by test method. |
| | | 61 | | /// </value> |
| | 5772 | 62 | | public IDictionary<TestMethod, ShortLineAnalysis> LineCoverageByTestMethod { get; } |
| | | 63 | | |
| | | 64 | | /// <summary> |
| | | 65 | | /// Gets the number of covered branches. |
| | | 66 | | /// </summary> |
| | | 67 | | /// <value> |
| | | 68 | | /// The number of covered branches. |
| | | 69 | | /// </value> |
| | 2686 | 70 | | public int? CoveredBranches { get; } |
| | | 71 | | |
| | | 72 | | /// <summary> |
| | | 73 | | /// Gets the number of total branches. |
| | | 74 | | /// </summary> |
| | | 75 | | /// <value> |
| | | 76 | | /// The number of total branches. |
| | | 77 | | /// </value> |
| | 58 | 78 | | public int? TotalBranches { get; } |
| | | 79 | | } |