< Summary

Information
Class: ShopGuard.Core.Models.Booking
Assembly: ShopGuard.Core
File(s): /home/runner/work/ShopGuard/ShopGuard/ShopGuard/ShopGuard.Core/Models/Booking.cs
Line coverage
100%
Covered lines: 6
Uncovered lines: 0
Coverable lines: 6
Total lines: 28
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_FirstName()100%11100%
get_LastName()100%11100%
get_TotalPrice()100%11100%
get_DepositPaid()100%11100%
get_BookingDates()100%11100%
get_AdditionalNeeds()100%11100%

File(s)

/home/runner/work/ShopGuard/ShopGuard/ShopGuard/ShopGuard.Core/Models/Booking.cs

#LineLine coverage
 1using System.Text.Json.Serialization;
 2
 3namespace ShopGuard.Core.Models;
 4
 5/// <summary>
 6/// Booking payload as defined by the restful-booker API contract.
 7/// Property names are mapped explicitly because the API uses all-lowercase JSON keys.
 8/// </summary>
 9public sealed class Booking
 10{
 11    [JsonPropertyName("firstname")]
 1512    public required string FirstName { get; init; }
 13
 14    [JsonPropertyName("lastname")]
 1315    public required string LastName { get; init; }
 16
 17    [JsonPropertyName("totalprice")]
 1518    public required int TotalPrice { get; init; }
 19
 20    [JsonPropertyName("depositpaid")]
 1321    public required bool DepositPaid { get; init; }
 22
 23    [JsonPropertyName("bookingdates")]
 1724    public required BookingDates BookingDates { get; init; }
 25
 26    [JsonPropertyName("additionalneeds")]
 1127    public string? AdditionalNeeds { get; init; }
 28}