< Summary

Information
Class: Trailblazer.Pathing.TraversalBuildResult
Assembly: Trailblazer
File(s): /home/runner/work/Trailblazer/Trailblazer/src/Trailblazer/Pathing/Authoring/TraversalBuildResult.cs
Line coverage
100%
Covered lines: 10
Uncovered lines: 0
Coverable lines: 10
Total lines: 43
Line coverage: 100%
Branch coverage
100%
Covered branches: 6
Total branches: 6
Branch coverage: 100%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%66100%

File(s)

/home/runner/work/Trailblazer/Trailblazer/src/Trailblazer/Pathing/Authoring/TraversalBuildResult.cs

#LineLine coverage
 1using System;
 2
 3namespace Trailblazer.Pathing;
 4
 5/// <summary>
 6/// Contains the runtime objects produced from a tokenized traversable-state authoring map.
 7/// </summary>
 8public sealed class TraversalBuildResult
 9{
 10    /// <summary>
 11    /// Creates a new traversal build result with the specified chart and generated transitions.
 12    /// </summary>
 13    /// <param name="chart">The navigation chart built from the authoring map.</param>
 14    /// <param name="generatedTransitions">The transitions generated from explicit marker pairs in the authoring map.</p
 15    /// <param name="generatedTransitionIdPrefix">The prefix used when generating stable ids for chart-owned transitions
 16    /// <exception cref="ArgumentNullException"></exception>
 4217    public TraversalBuildResult(
 4218        NavigationChart chart,
 4219        TraversalTransition[] generatedTransitions,
 4220        string? generatedTransitionIdPrefix = null)
 21    {
 4222        Chart = chart ?? throw new ArgumentNullException(nameof(chart));
 4123        GeneratedTransitions = generatedTransitions ?? Array.Empty<TraversalTransition>();
 4124        GeneratedTransitionIdPrefix = string.IsNullOrWhiteSpace(generatedTransitionIdPrefix)
 4125            ? chart.Name
 4126            : generatedTransitionIdPrefix;
 4127    }
 28
 29    /// <summary>
 30    /// The chart built from the authoring map.
 31    /// </summary>
 32    public NavigationChart Chart { get; }
 33
 34    /// <summary>
 35    /// The transitions generated from explicit marker pairs in the authoring map.
 36    /// </summary>
 37    public TraversalTransition[] GeneratedTransitions { get; }
 38
 39    /// <summary>
 40    /// Prefix used when generating stable ids for chart-owned transitions.
 41    /// </summary>
 42    public string GeneratedTransitionIdPrefix { get; }
 43}