< Summary - MechanicsSoftware — Coverage Report

Information
Class: MechanicsSoftware.Application.UseCases.Inventory.PartOutput
Assembly: MechanicsSoftware.Application
File(s): /home/runner/work/mechanics-software/mechanics-software/src/MechanicsSoftware.Application/UseCases/Inventory/PartOutput.cs
Line coverage
100%
Covered lines: 13
Uncovered lines: 0
Coverable lines: 13
Total lines: 20
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
.ctor(...)100%11100%
From(...)100%11100%

File(s)

/home/runner/work/mechanics-software/mechanics-software/src/MechanicsSoftware.Application/UseCases/Inventory/PartOutput.cs

#LineLine coverage
 1using MechanicsSoftware.Domain.Entities;
 2
 3namespace MechanicsSoftware.Application.UseCases.Inventory;
 4
 225public sealed record PartOutput(
 226    Guid Id,
 227    string Code,
 228    string Name,
 229    string? Description,
 2210    int UnitPriceInCents,
 2211    string UnitPriceFormatted,
 2212    int StockQuantity,
 2213    int ReservedQuantity,
 2214    int AvailableQuantity)
 15{
 16    public static PartOutput From(Part p) =>
 2217        new(p.Id, p.Code, p.Name, p.Description,
 2218            p.UnitPrice.Cents, p.UnitPrice.ToFormatted(),
 2219            p.StockQuantity, p.ReservedQuantity, p.AvailableQuantity);
 20}