public void TestDomReadOnlyLinksCreate(string name, Links expected)
        {
            // Arrange

            // Act
            var actual = DomReadOnlyLinks.Create(expected);

            this.Output.WriteLine("Test Name: {0}", name);
            this.Output.WriteLine(String.Empty);
            this.OutputDomTree(actual);

            // Assert
            DomReadOnlyLinksAssert.Equal(expected, actual);
        }
        // PUBLIC METHODS ///////////////////////////////////////////////////
        #region Assert Methods
        public static void Equal(Links expected, DomReadOnlyLinks actual)
        {
            if (expected == null)
            {
                Assert.Null(actual);
                return;
            }
            Assert.NotNull(actual);

            Assert.Equal(DomNodeType.Links, actual.NodeType);

            var actualLinks = actual.Links;

            LinksAssert.Equal(expected, actualLinks);
        }
        private void CompactDomLinks()
        {
            var domLinks = (IDomLinks)this.DomDocument.GetNode(DomNodeType.Links);

            if (domLinks == null || domLinks.IsReadOnly)
            {
                return;
            }

            var domReadWriteLinks = (DomReadWriteLinks)domLinks;
            var domParentNode     = (IContainerNode <DomNodeType>)domReadWriteLinks.ParentNode;

            var apiLinks         = domLinks.Links;
            var domReadOnlyLinks = DomReadOnlyLinks.Create(apiLinks);

            domParentNode.ReplaceNode(domReadWriteLinks, domReadOnlyLinks);
        }