Exemplo n.º 1
0
        public void Should_Create_Tree_Structure_with_No_Children()
        {
            var objectTreeWithMultipleChildren = new ObjectTreeWithMultipleChildren();

            _matcher.Match(objectTreeWithMultipleChildren);

            Assert.IsNotNullOrEmpty(objectTreeWithMultipleChildren.Id);
            Assert.IsNotNullOrEmpty(objectTreeWithMultipleChildren.Name);
            Assert.IsNull(objectTreeWithMultipleChildren.Parent, "Should only create one node (the root) in a tree structure");
            Assert.IsNotNull(objectTreeWithMultipleChildren.Children, "Should have the child element array instantiated");
            Assert.AreEqual(0, objectTreeWithMultipleChildren.Children.Count, "Should not have any children in the array");
        }
Exemplo n.º 2
0
        public void Should_Create_Tree_Structure_with_No_Children()
        {
            var objectTreeWithMultipleChildren = new ObjectTreeWithMultipleChildren();

            _matcher.Match(objectTreeWithMultipleChildren);

            Assert.IsNotNullOrEmpty(objectTreeWithMultipleChildren.Id);
            Assert.IsNotNullOrEmpty(objectTreeWithMultipleChildren.Name);
            Assert.IsNull(objectTreeWithMultipleChildren.Parent, "Should only create one node (the root) in a tree structure");
            Assert.IsNotNull(objectTreeWithMultipleChildren.Children, "Should have the child element array instantiated");
            Assert.AreEqual(0, objectTreeWithMultipleChildren.Children.Count, "Should not have any children in the array");
        }