• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

davewalker5 / ADS-B-BaseStationReader / 17810356290

17 Sep 2025 08:50PM UTC coverage: 89.06% (-0.8%) from 89.879%
17810356290

push

github

davewalker5
Implement the tracking profile object and reader/writer

385 of 467 branches covered (82.44%)

Branch coverage included in aggregate %.

0 of 19 new or added lines in 2 files covered. (0.0%)

1471 of 1617 relevant lines covered (90.97%)

39.39 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/BaseStationReader.BusinessLogic/Configuration/TrackingProfileWriter.cs
1
using System.Text.Json;
2
using BaseStationReader.Entities.Config;
3
using BaseStationReader.Entities.Interfaces;
4

5
namespace BaseStationReader.BusinessLogic.Configuration
6
{
7
    public class TrackingProfileReaderWriter : ITrackingProfileReaderWriter
8
    {
NEW
9
        private readonly JsonSerializerOptions SerializerOptions = new()
×
NEW
10
        {
×
NEW
11
            WriteIndented = true
×
NEW
12
        };
×
13

14
        /// <summary>
15
        /// Read a tracking profile from a JSON file
16
        /// </summary>
17
        /// <param name="filePath"></param>
18
        /// <returns></returns>
19
        public TrackingProfile Read(string filePath)
NEW
20
        {
×
NEW
21
            var json = File.ReadAllText(filePath);
×
NEW
22
            var profile = JsonSerializer.Deserialize<TrackingProfile>(json);
×
NEW
23
            return profile;
×
NEW
24
        }
×
25

26
        /// <summary>
27
        /// Write a tracking profile to a JSON file
28
        /// </summary>
29
        /// <param name="profile"></param>
30
        /// <param name="filePath"></param>
31
        public void Write(TrackingProfile profile, string filePath)
NEW
32
        {
×
NEW
33
            var json = JsonSerializer.Serialize(profile, SerializerOptions);
×
NEW
34
            File.WriteAllText(filePath, json);
×
NEW
35
        }
×
36
    }
37
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc