< Summary

Class:Itinero.Instructions.Types.RoundaboutInstruction
Assembly:Itinero.Instructions
File(s):/home/runner/work/routing2/routing2/src/Itinero.Instructions/Types/RoundaboutInstruction.cs
Covered lines:7
Uncovered lines:0
Coverable lines:7
Total lines:41
Line coverage:100% (7 of 7)
Covered branches:0
Total branches:0
Tag:224_14471318300

Metrics

MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%1100%
get_ExitIsOnTheInside()100%1100%
get_ExitNumber()100%1100%

File(s)

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

#LineLine coverage
 1// ReSharper disable UnusedAutoPropertyAccessor.Global
 2// ReSharper disable MemberCanBePrivate.Global
 3namespace Itinero.Instructions.Types;
 4
 5/// <summary>
 6/// A roundabout instruction.
 7/// </summary>
 8public class RoundaboutInstruction : BaseInstruction
 9{
 10    public RoundaboutInstruction(
 11        IndexedRoute route,
 12        int shapeIndex,
 13        int shapeIndexEnd,
 14        int turnDegrees,
 15        int exitNumber,
 716        bool exitIsOnTheInside = false) : base(route, shapeIndex, shapeIndexEnd, turnDegrees)
 717    {
 718        this.ExitNumber = exitNumber;
 719        this.ExitIsOnTheInside = exitIsOnTheInside;
 720    }
 21
 22    /// <summary>
 23    /// True when the exit leads to the inside of the roundabout.
 24    /// </summary>
 25    /// <remarks>
 26    /// Example: https://www.openstreetmap.org/directions?engine=graphhopper_car&route=50.94569%2C3.15129%3B50.94636%2C3
 27    /// </remarks>
 1028    public bool ExitIsOnTheInside { get; }
 29
 30    /// <summary>
 31    /// The number of the exit to take (one-based).
 32    /// </summary>
 1433    public int ExitNumber { get; }
 34
 35    //
 36    // public override string ToString()
 37    // {
 38    //     return $"Take the roundabout to go {TurnDegrees.DegreesToText()} via the {ExitNumber + 1}th exit."
 39    //            + (ExitIsOnTheInside ? "WARNING: this exit is on the inner side of the roundabout!" : "");
 40    // }
 41}