public void latches_duplicate_types_if_they_are_unique()
        {
            var policy1 = new UniquePolicy();
            var policy2 = new UniquePolicy();

            var actions = new ConfigurationActionSet("something");
            actions.Fill(policy1);

            // policy2 should be treated as a duplicate of policy1
            actions.Fill(policy2);

            actions.Actions.Single().ShouldBeTheSameAs(policy1);
        }
Beispiel #2
0
        public void latches_duplicate_types_if_they_are_unique()
        {
            var policy1 = new UniquePolicy();
            var policy2 = new UniquePolicy();

            var actions = new ConfigurationActionSet();

            actions.Fill(policy1);

            // policy2 should be treated as a duplicate of policy1
            actions.Fill(policy2);

            actions.Actions.Single().ShouldBeTheSameAs(policy1);
        }
Beispiel #3
0
        public void fill_action_puts_the_provenance_in_the_right_order()
        {
            var bottle = new AssemblyPackageInfo(Assembly.GetExecutingAssembly());
            var graph  = new ConfigGraph();

            graph.Push(bottle);
            var extension = new FakeRegistryExtension();

            graph.Push(extension);

            var policy = new UniquePolicy();

            graph.Add(policy, ConfigurationType.Policy);



            graph.LogsFor(ConfigurationType.Policy).Single()
            .ProvenanceChain.ShouldHaveTheSameElementsAs(new BottleProvenance(bottle), new FubuRegistryExtensionProvenance(extension));
        }
        public void fill_action_puts_the_provenance_in_the_right_order()
        {
            var bottle = new AssemblyPackageInfo(Assembly.GetExecutingAssembly());
            var graph = new ConfigGraph();

            graph.Push(bottle);
            var extension = new FakeRegistryExtension();
            graph.Push(extension);

            var policy = new UniquePolicy();
            graph.Add(policy, ConfigurationType.Policy);

            graph.LogsFor(ConfigurationType.Policy).Single()
                .ProvenanceChain.ShouldHaveTheSameElementsAs(new BottleProvenance(bottle), new FubuRegistryExtensionProvenance(extension));
        }