< Summary

Information
Class: LGDXRobotCloud.Data.Models.Business.Navigation.RobotChassisInfoBusinessModelExtensions
Assembly: LGDXRobotCloud.Data
File(s): /builds/yukaitung/lgdxrobot2-cloud/LGDXRobotCloud.Data/Models/Business/Navigation/RobotChassisInfoBusinessModel.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 13
Coverable lines: 13
Total lines: 42
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
ToDto(...)100%210%

File(s)

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

#LineLine coverage
 1using LGDXRobotCloud.Data.Models.DTOs.V1.Responses;
 2
 3namespace LGDXRobotCloud.Data.Models.Business.Navigation;
 4
 5public record RobotChassisInfoBusinessModel
 6{
 7  public int Id { get; set; }
 8
 9  public required int RobotTypeId { get; set; }
 10
 11  public required double ChassisLengthX { get; set; }
 12
 13  public required double ChassisLengthY { get; set; }
 14
 15  public required int ChassisWheelCount { get; set; }
 16
 17  public required double ChassisWheelRadius { get; set; }
 18
 19  public required int BatteryCount { get; set; }
 20
 21  public required double BatteryMaxVoltage { get; set; }
 22
 23  public required double BatteryMinVoltage { get; set; }
 24}
 25
 26public static class RobotChassisInfoBusinessModelExtensions
 27{
 28  public static RobotChassisInfoDto ToDto(this RobotChassisInfoBusinessModel robotChassisInfo)
 029  {
 030    return new RobotChassisInfoDto {
 031      Id = robotChassisInfo.Id,
 032      RobotTypeId = robotChassisInfo.RobotTypeId,
 033      ChassisLengthX = robotChassisInfo.ChassisLengthX,
 034      ChassisLengthY = robotChassisInfo.ChassisLengthY,
 035      ChassisWheelCount = robotChassisInfo.ChassisWheelCount,
 036      ChassisWheelRadius = robotChassisInfo.ChassisWheelRadius,
 037      BatteryCount = robotChassisInfo.BatteryCount,
 038      BatteryMaxVoltage = robotChassisInfo.BatteryMaxVoltage,
 039      BatteryMinVoltage = robotChassisInfo.BatteryMinVoltage,
 040    };
 041  }
 42}