< Summary

Information
Class: Syki.Back.Configs.HttpConfigs
Assembly: Back
File(s): /home/runner/work/syki/syki/Back/Configs/HttpConfigs.cs
Tag: 22_11348620282
Line coverage
100%
Covered lines: 15
Uncovered lines: 0
Coverable lines: 15
Total lines: 34
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
AddHttpConfigs(...)100%11100%
UseExceptions(...)100%11100%
UseCustomHeaders(...)100%11100%
UseControllers(...)100%11100%
UseLogs(...)100%11100%

File(s)

/home/runner/work/syki/syki/Back/Configs/HttpConfigs.cs

#LineLine coverage
 1namespace Syki.Back.Configs;
 2
 3public static class HttpConfigs
 4{
 5    public static void AddHttpConfigs(this IServiceCollection services)
 6    {
 17        services.AddControllers();
 18        services.AddHttpContextAccessor();
 29        services.AddRouting(options => options.LowercaseUrls = true);
 110    }
 11
 12    public static void UseExceptions(this IApplicationBuilder app)
 13    {
 114        app.UseMiddleware<ExceptionsMiddleware>();
 115    }
 16
 17    public static void UseCustomHeaders(this IApplicationBuilder app)
 18    {
 119        app.UseMiddleware<CustomHeadersMiddleware>();
 120    }
 21
 22    public static void UseControllers(this IApplicationBuilder app)
 23    {
 124        app.UseEndpoints(options =>
 125        {
 126            options.MapControllers();
 227        });
 128    }
 29
 30    public static void UseLogs(this IApplicationBuilder app)
 31    {
 132        app.UseSerilogRequestLogging();
 133    }
 34}