< Summary

Class:Itinero.MapMatching.TrackPoint
Assembly:Itinero.MapMatching
File(s):/home/runner/work/routing2/routing2/src/Itinero.MapMatching/TrackPoint.cs
Covered lines:5
Uncovered lines:5
Coverable lines:10
Total lines:42
Line coverage:50% (5 of 10)
Covered branches:0
Total branches:0
Tag:251_23667616543

Metrics

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

File(s)

/home/runner/work/routing2/routing2/src/Itinero.MapMatching/TrackPoint.cs

#LineLine coverage
 1using System;
 2
 3namespace Itinero.MapMatching;
 4
 5/// <summary>
 6/// Represents a track point.
 7/// </summary>
 8public readonly struct TrackPoint
 9{
 10    /// <summary>
 11    /// Creates a new track point.
 12    /// </summary>
 13    /// <param name="longitude">The longitude.</param>
 14    /// <param name="latitude">The latitude.</param>
 15    public TrackPoint(double longitude, double latitude)
 344016    {
 344017        this.Location = (longitude, latitude);
 344018        this.Timestamp = null;
 344019    }
 20
 21    /// <summary>
 22    /// Creates a new track point with a timestamp.
 23    /// </summary>
 24    /// <param name="longitude">The longitude.</param>
 25    /// <param name="latitude">The latitude.</param>
 26    /// <param name="timestamp">The timestamp.</param>
 27    public TrackPoint(double longitude, double latitude, DateTimeOffset timestamp)
 028    {
 029        this.Location = (longitude, latitude);
 030        this.Timestamp = timestamp;
 031    }
 32
 33    /// <summary>
 34    /// Gets the location.
 35    /// </summary>
 1108836    public (double longitude, double latitude) Location { get; }
 37
 38    /// <summary>
 39    /// Gets the timestamp, if any.
 40    /// </summary>
 041    public DateTimeOffset? Timestamp { get; }
 42}