< Summary - AsyncResponse (Release / net8.0+net10.0 / unit+integration)

Information
Class: AsyncResponse.Transports.RabbitMQ.RabbitMqOptionsValidator
Assembly: AsyncResponse.Transports.RabbitMQ
File(s): /home/runner/work/AsyncResponse/AsyncResponse/src/Transports/AsyncResponse.Transports.RabbitMQ/RabbitMqOptionsValidator.cs
Line coverage
100%
Covered lines: 6
Uncovered lines: 0
Coverable lines: 6
Total lines: 17
Line coverage: 100%
Branch coverage
100%
Covered branches: 4
Total branches: 4
Branch coverage: 100%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
Required(...)100%22100%
Positive(...)100%22100%

File(s)

/home/runner/work/AsyncResponse/AsyncResponse/src/Transports/AsyncResponse.Transports.RabbitMQ/RabbitMqOptionsValidator.cs

#LineLine coverage
 1namespace AsyncResponse.Transports.RabbitMQ;
 2
 3internal static class RabbitMqOptionsValidator
 4{
 5    /// <summary>Validates the supplied options.</summary>
 6    public static string Required(string? value, string name)
 37        => !string.IsNullOrWhiteSpace(value)
 38            ? value
 39            : throw new InvalidOperationException($"{nameof(RabbitMqAsyncResponseOptions)}.{name} must be configured.");
 10
 11    /// <summary>Validates the supplied options.</summary>
 12    public static void Positive(TimeSpan value, string name)
 13    {
 314        if (value <= TimeSpan.Zero)
 315            throw new InvalidOperationException($"{nameof(RabbitMqAsyncResponseOptions)}.{name} must be positive.");
 316    }
 17}