Пример #1
0
        public void add_configuration_pak()
        {
            var pack = new DiscoveryActionsConfigurationPack();
            var graph = new ConfigGraph();

            graph.Add(pack);

            graph.LogsFor(ConfigurationType.Discovery).Each(log => {
                log.ProvenanceChain.ShouldHaveTheSameElementsAs(new ConfigurationPackProvenance(pack));
            });

            graph.LogsFor(ConfigurationType.Discovery).Any().ShouldBeTrue();
        }
Пример #2
0
        public void add_configuration_pack_has_to_be_idempotent()
        {
            var pack = new DiscoveryActionsConfigurationPack();
            var graph = new ConfigGraph();

            graph.Add(pack);

            var count = graph.LogsFor(ConfigurationType.Discovery).Count();

            graph.Add(new DiscoveryActionsConfigurationPack());
            graph.Add(new DiscoveryActionsConfigurationPack());
            graph.Add(new DiscoveryActionsConfigurationPack());
            graph.Add(new DiscoveryActionsConfigurationPack());
            graph.Add(new DiscoveryActionsConfigurationPack());

            graph.LogsFor(ConfigurationType.Discovery).Count()
                .ShouldEqual(count);
        }