< Summary

Information
Class: CounterDrone.Core.Repository.WaypointRepository
Assembly: CounterDrone.Core
File(s): C:\Users\Tellme\apps\CounterDroneBackend\src\CounterDrone.Core\Repository\WaypointRepository.cs
Line coverage
91%
Covered lines: 11
Uncovered lines: 1
Coverable lines: 12
Total lines: 27
Line coverage: 91.6%
Branch coverage
50%
Covered branches: 1
Total branches: 2
Branch coverage: 50%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%
GetByTaskId(...)100%11100%
DeleteByTaskId(...)50%2280%

File(s)

C:\Users\Tellme\apps\CounterDroneBackend\src\CounterDrone.Core\Repository\WaypointRepository.cs

#LineLine coverage
 1using System.Collections.Generic;
 2using System.Linq;
 3using CounterDrone.Core.Models;
 4using SQLite;
 5
 6namespace CounterDrone.Core.Repository
 7{
 8    public class WaypointRepository : BaseRepository<Waypoint>
 9    {
 9610        public WaypointRepository(SQLiteConnection db) : base(db) { }
 11
 12        public List<Waypoint> GetByTaskId(string taskId)
 4913        {
 4914            return Db.Table<Waypoint>()
 4915                     .Where(w => w.TaskId == taskId)
 4916                     .OrderBy(w => w.OrderIndex)
 4917                     .ToList();
 4918        }
 19
 20        public void DeleteByTaskId(string taskId)
 1421        {
 1422            var wps = GetByTaskId(taskId);
 4223            foreach (var w in wps)
 024                Db.Delete(w);
 1425        }
 26    }
 27}