< Summary

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

Metrics

MethodBranch coverage Cyclomatic complexity Line coverage
get_Name()100%1100%
Generate(...)100%2100%

File(s)

/home/runner/work/routing2/routing2/src/Itinero.Instructions/Types/Generators/BaseInstructionGenerator.cs

#LineLine coverage
 1namespace Itinero.Instructions.Types.Generators;
 2
 3internal class BaseInstructionGenerator : IInstructionGenerator
 4{
 135    public string Name { get; } = "base";
 6
 7    public BaseInstruction? Generate(IndexedRoute route, int offset)
 188    {
 189        if (offset + 1 >= route.Last)
 310        {
 11            // The current offset is already the last index of the shape; this is the endpoint
 312            return null;
 13        }
 14
 15        // We are on the end of segment 'offset', what should we do next?
 1516        return new BaseInstruction(route, offset, route.DirectionChangeAt(offset + 1));
 1817    }
 18}

Methods/Properties

get_Name()
Generate(...)