using Shouldly;
using Xunit;
using ZB.MOM.WW.OtOpcUa.Configuration.Enums;
using ZB.MOM.WW.OtOpcUa.Security.Auth;

namespace ZB.MOM.WW.OtOpcUa.Security.Tests;

public class DevAuthRolesTests
{
    [Fact]
    public void All_covers_every_AdminRole_plus_Operator()
    {
        foreach (var name in Enum.GetNames<AdminRole>())
            DevAuthRoles.All.ShouldContain(name);
        DevAuthRoles.All.ShouldContain("Operator");
        DevAuthRoles.All.Length.ShouldBe(Enum.GetNames<AdminRole>().Length + 1);
        DevAuthRoles.All.Distinct().Count().ShouldBe(DevAuthRoles.All.Length);
    }
}
