< Summary

Information
Class: LGDXRobotCloud.Data.Models.Business.Navigation.RobotBusinessModel
Assembly: LGDXRobotCloud.Data
File(s): /builds/yukaitung/lgdxrobot2-cloud/LGDXRobotCloud.Data/Models/Business/Navigation/RobotBusinessModel.cs
Line coverage
100%
Covered lines: 9
Uncovered lines: 0
Coverable lines: 9
Total lines: 46
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_IsProtectingHardwareSerialNumber()100%11100%
get_RobotCertificate()100%11100%
get_RobotSystemInfo()100%11100%
get_RobotChassisInfo()100%11100%
get_AssignedTasks()100%11100%

File(s)

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

#LineLine coverage
 1using LGDXRobotCloud.Data.Models.Business.Administration;
 2using LGDXRobotCloud.Data.Models.Business.Automation;
 3using LGDXRobotCloud.Data.Models.DTOs.V1.Responses;
 4
 5namespace LGDXRobotCloud.Data.Models.Business.Navigation;
 6
 7public record RobotBusinessModel
 8{
 189  public required Guid Id { get; set; }
 10
 1611  public required string Name { get; set; }
 12
 1613  public required int RealmId { get; set; }
 14
 1515  public required string RealmName { get; set; }
 16
 2117  public required bool IsProtectingHardwareSerialNumber { get; set; }
 18
 2019  public required RobotCertificateBusinessModel RobotCertificate { get; set; }
 20
 2321  public RobotSystemInfoBusinessModel? RobotSystemInfo { get; set; }
 22
 1123  public RobotChassisInfoBusinessModel? RobotChassisInfo { get; set; }
 24
 3025  public required IEnumerable<AutoTaskListBusinessModel> AssignedTasks { get; set; } = [];
 26}
 27
 28public static class RobotBusinessModelExtensions
 29{
 30  public static RobotDto ToDto(this RobotBusinessModel robot)
 31  {
 32    return new RobotDto {
 33      Id = robot.Id,
 34      Name = robot.Name,
 35      Realm = new RealmSearchDto {
 36        Id = robot.RealmId,
 37        Name = robot.RealmName,
 38      },
 39      IsProtectingHardwareSerialNumber = robot.IsProtectingHardwareSerialNumber,
 40      RobotCertificate = robot.RobotCertificate.ToDto(),
 41      RobotSystemInfo = robot.RobotSystemInfo?.ToDto(),
 42      RobotChassisInfo = robot.RobotChassisInfo?.ToDto(),
 43      AssignedTasks = robot.AssignedTasks.Select(a => a.ToDto()).ToList(),
 44    };
 45  }
 46}