Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        public void FindPolicies()
        {
            var definitions = VoyagerStartup.GetPolicies(new[] { typeof(BlankPolicy).Assembly });

            definitions.Count().Should().Be(2);
        }