< Summary

Line coverage
100%
Covered lines: 2
Uncovered lines: 0
Coverable lines: 2
Total lines: 470
Line coverage: 100%
Branch coverage
75%
Covered branches: 3
Total branches: 4
Branch coverage: 75%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
File 1: GridKey()100%11100%
File 2: IsAllowedKey(...)75%44100%

File(s)

/home/runner/work/Studio2Prod/Studio2Prod/OzonOrdersWeb/obj/Release/net8.0/System.Text.RegularExpressions.Generator/System.Text.RegularExpressions.Generator.RegexGenerator/RegexGenerator.g.cs

File '/home/runner/work/Studio2Prod/Studio2Prod/OzonOrdersWeb/obj/Release/net8.0/System.Text.RegularExpressions.Generator/System.Text.RegularExpressions.Generator.RegexGenerator/RegexGenerator.g.cs' does not exist (any more).

/home/runner/work/Studio2Prod/Studio2Prod/OzonOrdersWeb/WebServices/BitrixStock/BitrixSyncGridSettings.cs

#LineLine coverage
 1using System.Text.RegularExpressions;
 2
 3namespace OzonOrdersWeb.WebServices.BitrixStock;
 4
 5/// <summary>
 6/// Ключи настроек пользователя вкладки синхронизации в <c>OrdersGridUserSettings</c>:
 7/// <c>bsx.&lt;грид&gt;.columnState</c> (раскладка), <c>bsx.&lt;грид&gt;.prefs</c> (плотность, флаги),
 8/// <c>bsx.&lt;грид&gt;.lastView</c> (последние фильтры/сортировка) и общий <c>viewPrefs</c> — тема со страницы заказов.
 9/// </summary>
 10public static partial class BitrixSyncGridSettings
 11{
 12    [GeneratedRegex(@"^bsx\.[a-zA-Z]{1,32}\.(columnState|prefs|lastView)$", RegexOptions.CultureInvariant)]
 13    private static partial Regex GridKey();
 14
 15    public const string SharedViewPrefsKey = "viewPrefs";
 16
 17    public static bool IsAllowedKey(string? key)
 1218        => !string.IsNullOrEmpty(key) && (key == SharedViewPrefsKey || GridKey().IsMatch(key));
 19}