< Summary - Kestrun — Combined Coverage

Information
Class: Kestrun.Logging.Utils.Console.Cell
Assembly: Kestrun
File(s): /home/runner/work/Kestrun/Kestrun/src/CSharp/Kestrun/Logging/Utils/Console/Cell.cs
Tag: Kestrun/Kestrun@9d3a582b2d63930269564a7591aa77ef297cadeb
Line coverage
92%
Covered lines: 12
Uncovered lines: 1
Coverable lines: 13
Total lines: 25
Line coverage: 92.3%
Branch coverage
62%
Covered branches: 5
Total branches: 8
Branch coverage: 62.5%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Index()100%11100%
get_Value()100%11100%
get_MaxWidth()100%11100%
get_Row()100%210%
get_Column()100%11100%
get_Width()100%11100%
.ctor(...)66.66%66100%
ToString()50%22100%

File(s)

/home/runner/work/Kestrun/Kestrun/src/CSharp/Kestrun/Logging/Utils/Console/Cell.cs

#LineLine coverage
 1namespace Kestrun.Logging.Utils.Console;
 2
 3internal class Cell
 4{
 5    public const string NULL_PLACEHOLDER = "";
 6
 467    public int Index { get; }
 4028    public string Value { get; }
 749    public static int MaxWidth { get; private set; }
 10
 011    public Row Row { get; }
 7812    public Column? Column { get; set; }
 13
 37614    public int Width => Value.Length;
 15
 2616    public Cell(object value, int index, Row row)
 17    {
 2618        Index = index;
 2619        Value = value?.ToString() ?? NULL_PLACEHOLDER;
 2620        MaxWidth = Width > MaxWidth ? Width : MaxWidth;
 2621        Row = row;
 2622    }
 23
 2624    public override string ToString() => Column == null ? Value : Value.PadRight(Column.MaxWidth, ' ');
 25}