private void OverwritePolicy(IEnumerable <Assembly> assemblies) { var expectedRequirements = new AuthenticatedPolicyOverride().GetRequirements(); var definitions = VoyagerStartup.GetPolicies(assemblies); definitions.Should().Contain(def => def.Name == typeof(AuthenticatedPolicy).FullName); var actualRequirements = definitions.FirstOrDefault(def => def.Name == typeof(AuthenticatedPolicy).FullName).Policy.GetRequirements(); actualRequirements.Count.Should().Be(1); actualRequirements.First().GetType().Should().Be <CustomAppRequirement>(); definitions.Should().NotContain(def => def.Name == typeof(AuthenticatedPolicyOverride).FullName); }
public void FindPolicies() { var definitions = VoyagerStartup.GetPolicies(new[] { typeof(BlankPolicy).Assembly }); definitions.Count().Should().Be(2); }