< Summary

Information
Class: RaidLoop.Client.Components.ItemTypeIcon
Assembly: RaidLoop.Client
File(s): /home/runner/work/RaidLoop/RaidLoop/src/RaidLoop.Client/Components/ItemTypeIcon.razor
Line coverage
0%
Covered lines: 0
Uncovered lines: 16
Coverable lines: 16
Total lines: 57
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 14
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
BuildRenderTree(...)0%5670%
get_Type()100%210%
GetTitle()0%5670%

File(s)

/home/runner/work/RaidLoop/RaidLoop/src/RaidLoop.Client/Components/ItemTypeIcon.razor

#LineLine coverage
 1<span class="item-type-icon item-type-@Type.ToString().ToLower()" title="@GetTitle()" aria-label="@GetTitle()">
 02    @switch (Type)
 3    {
 4        case ItemType.Weapon:
 5            <svg viewBox="0 0 24 24" aria-hidden="true">
 6                <path d="M3 17.25V15.5l8.6-5.37 2.27 2.27-5.37 8.6H6.75l1.25-2-1-1z" />
 7                <path d="M13.75 8.5 16 6.25l1.75 1.75L15.5 10.25z" />
 8                <path d="M17.25 5l1.25-1.25L21 6.25 19.75 7.5z" />
 9            </svg>
 010            break;
 11        case ItemType.Armor:
 12            <svg viewBox="0 0 24 24" aria-hidden="true">
 13                <path d="M12 3 18 5.5v5.2c0 4.1-2.45 7.78-6 9.3-3.55-1.52-6-5.2-6-9.3V5.5z" />
 14                <path d="M12 7.5 9.5 9v2.2c0 2.3 1 4.34 2.5 5.54 1.5-1.2 2.5-3.24 2.5-5.54V9z" />
 15            </svg>
 016            break;
 17        case ItemType.Backpack:
 18            <svg viewBox="0 0 24 24" aria-hidden="true">
 19                <path d="M8 7.5A4 4 0 0 1 12 4a4 4 0 0 1 4 3.5" />
 20                <rect x="6" y="7" width="12" height="13" rx="2" />
 21                <path d="M9 11h6M9 14.5h6" />
 22            </svg>
 023            break;
 24        case ItemType.Consumable:
 25            <svg viewBox="0 0 24 24" aria-hidden="true">
 26                <path d="M10 4h4v4l3.5 3.5a4.95 4.95 0 0 1 0 7L16 20H8l-1.5-1.5a4.95 4.95 0 0 1 0-7L10 8z" />
 27                <path d="M9 12h6M12 9v6" />
 28            </svg>
 029            break;
 30        case ItemType.Material:
 31            <svg viewBox="0 0 24 24" aria-hidden="true">
 32                <path d="M5 12 12 5l7 7-7 7z" />
 33                <path d="M12 5v14M5 12h14" />
 34            </svg>
 035            break;
 36        default:
 37            <svg viewBox="0 0 24 24" aria-hidden="true">
 38                <path d="M4 9V6.5A1.5 1.5 0 0 1 5.5 5h7.25a2 2 0 0 1 1.41.59l5 5A2 2 0 0 1 19.75 12H16a2 2 0 0 1-2-2V6.2
 39                <path d="M8 13h8M8 16h5" />
 40            </svg>
 41            break;
 42    }
 43</span>
 44
 45@code {
 046    [Parameter, EditorRequired] public ItemType Type { get; set; }
 47
 048    private string GetTitle() => Type switch
 049    {
 050        ItemType.Weapon => "Weapon",
 051        ItemType.Armor => "Armor",
 052        ItemType.Backpack => "Backpack",
 053        ItemType.Consumable => "Consumable",
 054        ItemType.Material => "Material",
 055        _ => "Sell item"
 056    };
 57}