public void ShouldPreserveOrderingOfNodesThatAreAlreadySorted()
        {
            var sorter = new XmlClasslikeNodeSorter();

            var xml = @"<class><cache /><key /><one-to-one /><property /><many-to-one /><joined-subclass /><union-subclass /></class>";
            var doc = new XmlDocument();
            doc.LoadXml(xml);

            var node = doc.ChildNodes[0];
            sorter.Sort(node);

            node.OuterXml.ShouldEqual(xml);            
        }
        public void ShouldSortNodes()
        {
            var sorter = new XmlClasslikeNodeSorter();

            var xml = @"<class><property /><joined-subclass /><many-to-one /><union-subclass /><cache /><key /><one-to-one /></class>";
            var expected = @"<class><cache /><key /><one-to-one /><property /><many-to-one /><joined-subclass /><union-subclass /></class>";
            
            var doc = new XmlDocument();
            doc.LoadXml(xml);

            var node = doc.ChildNodes[0];
            sorter.Sort(node);

            node.OuterXml.ShouldEqual(expected);
        }