SenseNet.ContentRepository.Tests.NodeListTests.NodeList_BrokenReference C# (CSharp) Метод

NodeList_BrokenReference() приватный Метод

private NodeList_BrokenReference ( ) : void
Результат void
        public void NodeList_BrokenReference()
        {
            var intList = new int[] { 1, 2, Int32.MaxValue, 4, Int32.MaxValue - 1, 6 };
            var nodeList = (NodeList<Node>)new PrivateObject(typeof(NodeList<Node>), intList).Target;
            var nodes = (IEnumerable<Node>)nodeList;

            Assert.IsTrue(nodeList.Count == 6, "#1");

            //Do not use ToList() here, because it creates 
            //an array that uses the first, wrong size. The result
            //will be a few 'null' nodes at the end of the list...
            //var list = nodes.ToList();

            var list = new List<Node>();
            foreach (var node in nodes)
                list.Add(node);

		    Assert.IsTrue(list.Count == 4, "#2");
        }