Exemplo n.º 1
0
        List <BuildOutputNode> GetTestNodes()
        {
            var result    = new List <BuildOutputNode> ();
            var buildNode = new BuildOutputNode()
            {
                NodeType = BuildOutputNodeType.Build, Message = BuildMessage
            };

            result.Add(buildNode);
            var projectNode = new BuildOutputNode()
            {
                NodeType = BuildOutputNodeType.Project, Message = ProjectMessage
            };

            result.Add(projectNode);
            buildNode.AddChild(projectNode);
            var targetNode = new BuildOutputNode()
            {
                NodeType = BuildOutputNodeType.Target, Message = "Csc"
            };

            result.Add(targetNode);
            projectNode.AddChild(targetNode);
            var alertNode = new BuildOutputNode()
            {
                NodeType = BuildOutputNodeType.Error, Message = ErrorMessage
            };

            result.Add(alertNode);
            targetNode.AddChild(alertNode);
            return(result);
        }
Exemplo n.º 2
0
        public void BuildOutputNode_Children()
        {
            var node = new BuildOutputNode();

            Assert.IsFalse(node.HasChildren);
            Assert.IsTrue(node.Children == null);
            var childNode = new BuildOutputNode();

            node.AddChild(childNode);
            Assert.IsTrue(node.HasChildren);
            Assert.IsTrue(node.Children != null);
            Assert.AreSame(childNode.Parent, node);
            Assert.AreEqual(1, node.Children.Count);
        }