using Bit.Core.AdminConsole.Enums; using Bit.Core.AdminConsole.Models.Data.Organizations.Policies; using Bit.Core.AdminConsole.OrganizationFeatures.Policies.PolicyRequirements; namespace Bit.Core.Test.AdminConsole.OrganizationFeatures.Policies; /// /// Intentionally simplified PolicyRequirement that just holds the input PolicyDetails for us to assert against. /// public class TestPolicyRequirement : IPolicyRequirement { public IEnumerable Policies { get; init; } = []; } public class TestPolicyRequirementFactory(Func enforce) : IPolicyRequirementFactory { public PolicyType PolicyType => PolicyType.SingleOrg; public bool Enforce(PolicyDetails policyDetails) => enforce(policyDetails); public TestPolicyRequirement Create(IEnumerable policyDetails) => new() { Policies = policyDetails }; }