Esempio n. 1
0
 /// <summary>
 /// Adds a <see cref="DistributionStrategyCollectionNode"/>.
 /// </summary>
 protected override void AddDefaultChildNodes()
 {
     base.AddDefaultChildNodes();
     DistributionStrategyCollectionNode node = new DistributionStrategyCollectionNode(loggingSettings.DistributionStrategies);
     Nodes.AddWithDefaultChildren(node);
     this.ResolveNodeReferences();
 }
 public void StrategiesDefaultChildNodesTest()
 {
     DistributionStrategyCollectionNode node = new DistributionStrategyCollectionNode();
     applicationNode.Nodes.AddWithDefaultChildren(node);
     Assert.AreEqual(1, node.Nodes.Count);
     Assert.AreEqual(typeof(InProcDistributionStrategyNode), node.Nodes[0].GetType());
 }
 public void StrategiesPropertiesTest()
 {
     DistributionStrategyCollectionNode node = new DistributionStrategyCollectionNode();
     applicationNode.Nodes.Add(node);
     Assert.AreEqual(SR.DistributionStrategies, node.Name);
 }
        public void StrategiesDataTest()
        {
            string dataName = "TestName";

            DistributionStrategyDataCollection dataCollection = new DistributionStrategyDataCollection();
            DistributionStrategyData data = new CustomDistributionStrategyData();
            data.Name = dataName;
            dataCollection.Add(data);

            DistributionStrategyCollectionNode node = new DistributionStrategyCollectionNode(dataCollection);
            applicationNode.Nodes.Add(node);
            Assert.AreEqual(1, node.Nodes.Count);
            Assert.AreEqual(dataName, node.Nodes[0].Name);
        }