< Summary

Information
Class: LGDXRobotCloud.Data.Models.Business.Navigation.WaypointListBusinessModel
Assembly: LGDXRobotCloud.Data
File(s): /builds/yukaitung/lgdxrobot2-cloud/LGDXRobotCloud.Data/Models/Business/Navigation/WaypointListBusinessModel.cs
Line coverage
100%
Covered lines: 10
Uncovered lines: 0
Coverable lines: 10
Total lines: 52
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Id()100%11100%
get_Name()100%11100%
get_RealmId()100%11100%
get_RealmName()100%11100%
get_X()100%11100%
get_Y()100%11100%
get_Rotation()100%11100%
get_IsParking()100%11100%
get_HasCharger()100%11100%
get_IsReserved()100%11100%

File(s)

/builds/yukaitung/lgdxrobot2-cloud/LGDXRobotCloud.Data/Models/Business/Navigation/WaypointListBusinessModel.cs

#LineLine coverage
 1using LGDXRobotCloud.Data.Models.DTOs.V1.Responses;
 2
 3namespace LGDXRobotCloud.Data.Models.Business.Navigation;
 4
 5public record WaypointListBusinessModel
 6{
 187  public required int Id { get; set; }
 8
 149  public required string Name { get; set; }
 10
 1411  public required int RealmId { get; set; }
 12
 713  public required string RealmName { get; set; }
 14
 1415  public required double X { get; set; }
 16
 1417  public required double Y { get; set; }
 18
 1419  public required double Rotation { get; set; }
 20
 1421  public required bool IsParking { get; set; }
 22
 1423  public required bool HasCharger { get; set; }
 24
 1425  public required bool IsReserved { get; set; }
 26}
 27
 28public static class WaypointListBusinessModelExtensions
 29{
 30  public static WaypointListDto ToDto(this WaypointListBusinessModel model)
 31  {
 32    return new WaypointListDto {
 33      Id = model.Id,
 34      Name = model.Name,
 35      Realm = new RealmSearchDto {
 36        Id = model.RealmId,
 37        Name = model.RealmName,
 38      },
 39      X = model.X,
 40      Y = model.Y,
 41      Rotation = model.Rotation,
 42      IsParking = model.IsParking,
 43      HasCharger = model.HasCharger,
 44      IsReserved = model.IsReserved,
 45    };
 46  }
 47
 48  public static IEnumerable<WaypointListDto> ToDto(this IEnumerable<WaypointListBusinessModel> models)
 49  {
 50    return models.Select(model => model.ToDto());
 51  }
 52}