< Summary - Heimdall API

Information
Class: ArturRios.Heimdall.Shared.Messages.ApplicationCredentialMessageMap
Assembly: ArturRios.Heimdall.Shared
File(s): /home/runner/work/heimdall-api/heimdall-api/src/Application/ArturRios.Heimdall.Shared/Messages/ApplicationCredentialMessageMap.cs
Line coverage
100%
Covered lines: 22
Uncovered lines: 0
Coverable lines: 22
Total lines: 30
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage
100%
Covered methods: 1
Fully covered methods: 1
Total methods: 1
Method coverage: 100%
Full method coverage: 100%

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.cctor()100%11100%

File(s)

/home/runner/work/heimdall-api/heimdall-api/src/Application/ArturRios.Heimdall.Shared/Messages/ApplicationCredentialMessageMap.cs

#LineLine coverage
 1using ArturRios.Util.Http;
 2
 3namespace ArturRios.Heimdall.Shared.Messages;
 4
 5/// <summary>Status codes for <c>ApplicationCredentialController</c>'s messages (UC-53…UC-55).</summary>
 6public static class ApplicationCredentialMessageMap
 7{
 28    public static readonly IReadOnlyDictionary<string, int> StatusCodes =
 29        DataAccessMessageMap.CombinedWith(new Dictionary<string, int>
 210        {
 211            // UC-53 main flow — credential issued.
 212            [ApplicationCredentialMessages.CredentialIssued] = HttpStatusCodes.Created,
 213            // AF-53a, AF-54a, AF-55a — no live application in the addressed, live scope.
 214            [ApplicationMessages.ApplicationNotFound] = HttpStatusCodes.NotFound,
 215            // AF-53b, AF-54b, AF-55b — the actor may not manage the application.
 216            [ApplicationCredentialMessages.NotAuthorizedToManageCredentials] = HttpStatusCodes.Forbidden,
 217            // AF-53c — the expiry is not in the future.
 218            [ApplicationCredentialMessages.ExpiryNotInFuture] = HttpStatusCodes.BadRequest,
 219            // AF-53d — two live credentials already.
 220            [ApplicationCredentialMessages.CredentialLimitReached] = HttpStatusCodes.Conflict,
 221            // UC-54 main flow and its empty case — credentials listed.
 222            [ApplicationCredentialMessages.CredentialsRetrieved] = HttpStatusCodes.Ok,
 223            // UC-55 main flow — credential revoked.
 224            [ApplicationCredentialMessages.CredentialRevoked] = HttpStatusCodes.Ok,
 225            // AF-55c — no such credential on this application.
 226            [ApplicationCredentialMessages.CredentialNotFound] = HttpStatusCodes.NotFound,
 227            // AF-55d — already revoked.
 228            [ApplicationCredentialMessages.CredentialAlreadyRevoked] = HttpStatusCodes.Conflict
 229        });
 30}

Methods/Properties

.cctor()