< 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
0%
Covered lines: 0
Uncovered lines: 10
Coverable lines: 10
Total lines: 49
Line coverage: 0%
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%210%
get_Name()100%210%
get_RealmId()100%210%
get_RealmName()100%210%
get_IsRealtimeExchange()100%210%
get_IsProtectingHardwareSerialNumber()100%210%
get_RobotCertificate()100%210%
get_RobotSystemInfo()100%210%
get_RobotChassisInfo()100%210%
get_AssignedTasks()100%210%

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{
 09  public required Guid Id { get; set; }
 10
 011  public required string Name { get; set; }
 12
 013  public required int RealmId { get; set; }
 14
 015  public required string RealmName { get; set; }
 16
 017  public required bool IsRealtimeExchange { get; set; }
 18
 019  public required bool IsProtectingHardwareSerialNumber { get; set; }
 20
 021  public required RobotCertificateBusinessModel RobotCertificate { get; set; }
 22
 023  public RobotSystemInfoBusinessModel? RobotSystemInfo { get; set; }
 24
 025  public RobotChassisInfoBusinessModel? RobotChassisInfo { get; set; }
 26
 027  public required IEnumerable<AutoTaskListBusinessModel> AssignedTasks { get; set; } = [];
 28}
 29
 30public static class RobotBusinessModelExtensions
 31{
 32  public static RobotDto ToDto(this RobotBusinessModel robot)
 33  {
 34    return new RobotDto {
 35      Id = robot.Id,
 36      Name = robot.Name,
 37      Realm = new RealmSearchDto {
 38        Id = robot.RealmId,
 39        Name = robot.RealmName,
 40      },
 41      IsRealtimeExchange = robot.IsRealtimeExchange,
 42      IsProtectingHardwareSerialNumber = robot.IsProtectingHardwareSerialNumber,
 43      RobotCertificate = robot.RobotCertificate.ToDto(),
 44      RobotSystemInfo = robot.RobotSystemInfo?.ToDto(),
 45      RobotChassisInfo = robot.RobotChassisInfo?.ToDto(),
 46      AssignedTasks = robot.AssignedTasks.Select(a => a.ToDto()).ToList(),
 47    };
 48  }
 49}