< Summary

Information
Class: Trailblazer.Pathing.HybridRoutePlanSurveyResult
Assembly: Trailblazer
File(s): /home/runner/work/Trailblazer/Trailblazer/src/Trailblazer/Pathing/Search/Hybrid/Support/HybridRoutePlanSurveyResult.cs
Line coverage
100%
Covered lines: 17
Uncovered lines: 0
Coverable lines: 17
Total lines: 44
Line coverage: 100%
Branch coverage
83%
Covered branches: 5
Total branches: 6
Branch coverage: 83.3%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_HasPath()100%44100%
.cctor()100%11100%
.ctor()100%11100%
Create(...)50%22100%
Reset()100%11100%

File(s)

/home/runner/work/Trailblazer/Trailblazer/src/Trailblazer/Pathing/Search/Hybrid/Support/HybridRoutePlanSurveyResult.cs

#LineLine coverage
 1using System;
 2
 3namespace Trailblazer.Pathing;
 4
 5/// <summary>
 6/// Cached transition-aware route plan used by staged guides.
 7/// </summary>
 8internal sealed class HybridRoutePlanSurveyResult : SurveyResult
 9{
 10    public HybridRoutePlan? RoutePlan { get; private set; }
 11
 12    /// <inheritdoc/>
 1613    public override bool HasPath => IsValid && RoutePlan != null && RoutePlan.Steps.Length > 0;
 14
 115    public static readonly HybridRoutePlanSurveyResult Empty = new();
 16
 1617    private HybridRoutePlanSurveyResult() { }
 18
 19    internal static HybridRoutePlanSurveyResult Create(
 20        TrailblazerWorldContext context,
 21        HybridRoutePlan routePlan,
 22        string[] chartsUtilized,
 23        int key)
 24    {
 725        PathRequestContextResolver.ThrowIfUnusable(context);
 726        return new HybridRoutePlanSurveyResult
 727        {
 728            IsValid = true,
 729            IsInUse = false,
 730            Context = context,
 731            ChartsUtilized = chartsUtilized ?? Array.Empty<string>(),
 732            RoutePlan = routePlan,
 733            LastUsedFrame = -1,
 734            RequestHashKey = key
 735        };
 36    }
 37
 38    /// <inheritdoc/>
 39    public override void Reset()
 40    {
 741        base.Reset();
 742        RoutePlan = null;
 743    }
 44}