Class ProtoReportItemExtensions

Namespace
ProtoTest.Core
Assembly
ProtoTest.Core.dll

Traversal and coverage arithmetic shared by every consumer of ProtoReportItem trees - the report summary, the HTML renderer and Run gate coverage - so the three cannot disagree.

public static class ProtoReportItemExtensions
Inheritance
ProtoReportItemExtensions
Inherited Members

Methods

CoverageTotals(IEnumerable<ProtoReportItem>)

Aggregates the coverage units in items; aggregate rows are excluded from every count.

public static ProtoCoverageTotals CoverageTotals(this IEnumerable<ProtoReportItem> items)

Parameters

items IEnumerable<ProtoReportItem>

Returns

ProtoCoverageTotals

CoverageUnits(IEnumerable<ProtoReportItem>)

The coverage items that carry a verdict. An item whose IsCovered is null is an aggregate - a type, a grouping row - not a unit, so it is excluded from coverage accounting everywhere.

public static IEnumerable<ProtoReportItem> CoverageUnits(this IEnumerable<ProtoReportItem> items)

Parameters

items IEnumerable<ProtoReportItem>

Returns

IEnumerable<ProtoReportItem>

Flatten(ProtoReportItem)

Yields the item and all of its descendants, depth first.

public static IEnumerable<ProtoReportItem> Flatten(this ProtoReportItem item)

Parameters

item ProtoReportItem

Returns

IEnumerable<ProtoReportItem>

Flatten(IEnumerable<ProtoReportItem>)

Yields every item and all of its descendants, depth first.

public static IEnumerable<ProtoReportItem> Flatten(this IEnumerable<ProtoReportItem> items)

Parameters

items IEnumerable<ProtoReportItem>

Returns

IEnumerable<ProtoReportItem>

IsKind(ProtoReportItem, string)

Tests an item's kind. Kinds are open strings and integrations may capitalize them, so the comparison ignores case.

public static bool IsKind(this ProtoReportItem item, string kind)

Parameters

item ProtoReportItem
kind string

Returns

bool