< Summary - Syki

Information
Class: Syki.Back.Domain.Identity.SykiRole
Assembly: Back
File(s): /home/runner/work/syki/syki/Back/Domain/Identity/SykiRole.cs
Tag: 59_26926194815
Line coverage
100%
Covered lines: 20
Uncovered lines: 0
Coverable lines: 20
Total lines: 32
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
get_OwnerId()100%11100%
get_Description()100%11100%
get_BaseType()100%11100%
get_Permissions()100%11100%
.ctor()100%11100%
.ctor(...)100%11100%
IsSubsetOf(...)100%11100%

File(s)

/home/runner/work/syki/syki/Back/Domain/Identity/SykiRole.cs

#LineLine coverage
 1namespace Syki.Back.Domain.Identity;
 2
 3public class SykiRole : IdentityRole<int>
 4{
 3525    public int? OwnerId { get; set; }
 3566    public string Description { get; set; }
 6367    public UserType BaseType { get; set; }
 6448    public List<int> Permissions { get; set; }
 9
 125610    public SykiRole() { }
 11
 812    public SykiRole(
 813        int ownerId,
 814        string name,
 815        string description,
 816        UserType baseType,
 817        List<int> permissions)
 18    {
 819        OwnerId = ownerId;
 820        Name = name;
 821        NormalizedName = name.ToUpper();
 822        Description = description;
 823        BaseType = baseType;
 824        Permissions = permissions;
 825        ConcurrencyStamp = Guid.NewGuid().ToString();
 826    }
 27
 28    public bool IsSubsetOf(List<int> permissions)
 29    {
 830        return Permissions.IsSubsetOf(permissions);
 31    }
 32}