< Summary

Class:Itinero.Instructions.Types.EndInstruction
Assembly:Itinero.Instructions
File(s):/home/runner/work/routing2/routing2/src/Itinero.Instructions/Types/EndInstruction.cs
Covered lines:11
Uncovered lines:3
Coverable lines:14
Total lines:38
Line coverage:78.5% (11 of 14)
Covered branches:0
Total branches:0
Tag:224_14471318300

Metrics

MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%1100%
.ctor(...)100%1100%
ToString()100%10%

File(s)

/home/runner/work/routing2/routing2/src/Itinero.Instructions/Types/EndInstruction.cs

#LineLine coverage
 1namespace Itinero.Instructions.Types;
 2
 3public class EndInstruction : BaseInstruction
 4{
 5    /// <summary>
 6    ///     The distance between the actual start point and the snapped start point on the road
 7    /// </summary>
 8    public readonly uint ProjectionDistance;
 9
 10    /// <summary>
 11    /// The 'endInstruction' represents the projection from the actual endpoint (e.g. an adress) to the snapped point on
 12    /// It doesn't really have an associated segment.
 13    /// </summary>
 14    /// <param name="route"></param>
 15    /// <param name="turnDegrees"></param>
 16    /// <param name="projectionDistance"></param>
 17    /// <param name="index"></param>
 18    /// <param name="indexEnd"></param>
 19    public EndInstruction(IndexedRoute route, int turnDegrees, uint projectionDistance, int index, int indexEnd) :
 1220        base(route, index, indexEnd, turnDegrees)
 1221    {
 1222        ProjectionDistance = projectionDistance;
 1223    }
 24
 25
 1226    public EndInstruction(IndexedRoute route) : this(
 1227        route,
 1228        0,
 1229        0,
 1230        route.Shape.Count - 2,
 1231        route.Shape.Count - 1)
 2432    { }
 33
 34    public override string ToString()
 035    {
 036        return $"Your destination lies {ProjectionDistance}m away from the road";
 037    }
 38}

Methods/Properties

.ctor(...)
.ctor(...)
ToString()