< Summary - Heimdall API

Information
Class: ArturRios.Heimdall.WebApi.Email.LoggingRestrictionLiftNotifier
Assembly: ArturRios.Heimdall.WebApi
File(s): /home/runner/work/heimdall-api/heimdall-api/src/Presentation/ArturRios.Heimdall.WebApi/Email/LoggingRestrictionLiftNotifier.cs
Line coverage
100%
Covered lines: 3
Uncovered lines: 0
Coverable lines: 3
Total lines: 20
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage
100%
Covered methods: 2
Fully covered methods: 2
Total methods: 2
Method coverage: 100%
Full method coverage: 100%

Metrics

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

File(s)

/home/runner/work/heimdall-api/heimdall-api/src/Presentation/ArturRios.Heimdall.WebApi/Email/LoggingRestrictionLiftNotifier.cs

#LineLine coverage
 1using ArturRios.Heimdall.Command.Services;
 2using ArturRios.Heimdall.Shared.Security;
 3
 4namespace ArturRios.Heimdall.WebApi.Email;
 5
 6/// <summary>
 7///     Stand-in <see cref="IRestrictionLiftNotifier" /> for environments with no Mailgun
 8///     credentials, matching the other logging senders. Production refuses to start without
 9///     delivery configured, so this never runs there.
 10/// </summary>
 611public class LoggingRestrictionLiftNotifier(ILogger<LoggingRestrictionLiftNotifier> logger)
 12    : IRestrictionLiftNotifier
 13{
 14    public Task<bool> NotifyAsync(string email)
 15    {
 116        logger.LogInformation("Restriction lift notification issued for {EmailRef}", LogSafeEmail.Reference(email));
 17
 118        return Task.FromResult(true);
 19    }
 20}