예제 #1
0
 public void AddNode(AffectedGraphNode affectedGraphNode)
 {
     if (affectedGraphNode == null) return;
     lock (this)
     {
         if (!_nodes.ContainsKey(affectedGraphNode.FullName))
         {
             _nodes.Add(affectedGraphNode.FullName, affectedGraphNode);
         }
     }
 }
예제 #2
0
 public void AddNode(AffectedGraphNode affectedGraphNode)
 {
     if (affectedGraphNode == null)
     {
         return;
     }
     lock (this)
     {
         if (!_nodes.ContainsKey(affectedGraphNode.FullName))
         {
             _nodes.Add(affectedGraphNode.FullName, affectedGraphNode);
         }
     }
 }
 public void when_root_node_get_root_node_returns_root_node()
 {
     var g = new AffectedGraph();
     var root = new AffectedGraphNode("foo", false, false, true, "name", "bar::foo", "assembly", "type", new List<TestDescriptor>(), false, false, 0);
     g.AddNode(root);
     g.AddNode(new AffectedGraphNode("foo", false, false, false, "name", "bar::foo2", "assembly", "type", new List<TestDescriptor>(), false, false, 0));
     Assert.AreEqual(root, g.GetRootNode());
 }